From 1376f1e6c2c75b7bc9a9aade923b9c1013d971cb Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Thu, 5 Aug 2021 11:53:38 -0700 Subject: [PATCH] Revert "fix: update tag module workflow to add labels instead of setting one label" --- .github/workflows/tag_module_cleanup.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tag_module_cleanup.yml b/.github/workflows/tag_module_cleanup.yml index 9cec19500..94e7ec692 100644 --- a/.github/workflows/tag_module_cleanup.yml +++ b/.github/workflows/tag_module_cleanup.yml @@ -5,14 +5,14 @@ name: Tag module cleanup # Trigger on pull requests against goog_module branch only # Uses pull_request_target to get write permissions so that it can write labels. -on: +on: pull_request_target: branches: - goog_module jobs: tag-module-cleanup: - + # Add the type: cleanup label runs-on: ubuntu-latest steps: @@ -23,22 +23,13 @@ jobs: // https://github.com/google/blockly/milestone/18 const milestoneNumber = 18; // Note that pull requests are accessed through the issues API. - - const issueGetParams = { - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number - } - - const issueInfo = await github.issues.get(issueGetParams) - - const issuesUpdateParams = { - owner: context.repo.owner, - repo: context.repo.repo, + const issuesUpdateParams = { + owner: context.repo.owner, + repo: context.repo.repo, // Adds the milestone - milestone: milestoneNumber, + milestone: milestoneNumber, issue_number: context.issue.number, // Sets the labels - labels: [...issueInfo.labels, 'type: cleanup'] + labels: ['type: cleanup'] } await github.issues.update(issuesUpdateParams)