From a9e60851ef87625f915a1fe33da6cb5b909f313a Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Fri, 16 Jul 2021 11:49:35 -0700 Subject: [PATCH 1/2] 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) From 05f8c27302718a89136532b57d18e87557542bcb Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Fri, 16 Jul 2021 11:52:38 -0700 Subject: [PATCH 2/2] Use full commit hash. --- .github/workflows/tag_module_cleanup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag_module_cleanup.yml b/.github/workflows/tag_module_cleanup.yml index 8ee344066..2b14426ad 100644 --- a/.github/workflows/tag_module_cleanup.yml +++ b/.github/workflows/tag_module_cleanup.yml @@ -15,7 +15,7 @@ jobs: # Add the type: cleanup label runs-on: ubuntu-latest steps: - - uses: actions/github-script@a3e7071 + - uses: actions/github-script@a3e7071a34d7e1f219a8a4de9a5e0a34d1ee1293 with: script: | // 2021 q3 release milestone.