forked from google/blockly
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 1.26 KB
/
tag_module_cleanup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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
# Uses pull_request_target to get write permissions so that it can write labels.
on:
pull_request_target:
branches:
- goog_module
jobs:
tag-module-cleanup:
# Add the type: cleanup label
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
// Note that pull requests are considered issues and "shared"
// actions for both features, like manipulating labels and
// milestones are provided within the issues API.
await github.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
// 2021 q3 release milestone.
// https://github.com/google/blockly/milestone/18
milestone: 18
})
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['type: cleanup']
})