-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (26 loc) · 860 Bytes
/
review-label.yaml
File metadata and controls
28 lines (26 loc) · 860 Bytes
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
name: Add review label
on:
project_card:
types:
- moved
jobs:
add-labels:
runs-on: ubuntu-latest
# https://github.com/gokken-roko/github-tutorials/projects/1#column-17292314
if: github.event.project_card.column_id == '17292314'
steps:
- name: Add labels
uses: actions/github-script@v6.4.0
with:
github-token: ${{secrets.MY_GITHUB_TOKEN}}
script: |
console.log('CONTEXT', context)
const issue_url = context.payload.project_card.content_url
const issue = await github.request(issue_url)
console.log('ISSUE', issue)
github.rest.issues.addLabels({
issue_number: issue.data.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['triage/review']
})