mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
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:
34
.github/workflows/tag_module_cleanup.yml
vendored
Normal file
34
.github/workflows/tag_module_cleanup.yml
vendored
Normal 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)
|
||||
Reference in New Issue
Block a user