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).
This commit is contained in:
Rachel Fenichel
2021-07-16 11:49:35 -07:00
committed by GitHub
parent 410e0d58d1
commit a9e60851ef

View File

@@ -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)