From a9e60851ef87625f915a1fe33da6cb5b909f313a Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Fri, 16 Jul 2021 11:49:35 -0700 Subject: [PATCH] Auto-tag and add milestones for cleanup PRs For new pull requests against the goog_module branch, adds the 'type: cleanup' label and sets the milestone to q3 2021 release. Based on [this PR](https://github.com/eclipse-theia/theia/pull/8631/files). --- .github/workflows/tag_module_cleanup.yml | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/tag_module_cleanup.yml diff --git a/.github/workflows/tag_module_cleanup.yml b/.github/workflows/tag_module_cleanup.yml new file mode 100644 index 000000000..8ee344066 --- /dev/null +++ b/.github/workflows/tag_module_cleanup.yml @@ -0,0 +1,34 @@ +# For new pull requests against the goog_module branch, adds the 'type: cleanup' +# label and sets the milestone to q3 2021 release. + +name: Tag module cleanup + +# Trigger on pull requests against goog_module branch only +on: + pull_request: + branches: + - goog_module + +jobs: + tag-module-cleanup: + + # Add the type: cleanup label + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@a3e7071 + with: + script: | + // 2021 q3 release milestone. + // https://github.com/google/blockly/milestone/18 + const milestoneNumber = 18; + // Note that pull requests are accessed through the issues API. + const issuesUpdateParams = { + owner: context.repo.owner, + repo: context.repo.repo, + // Adds the milestone + milestone: milestoneNumber, + issue_number: context.issue.number, + // Sets the labels + labels: ['type: cleanup'] + } + await github.issues.update(issuesUpdateParams)