generated from OneGraph/oneblog
-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (60 loc) · 2.46 KB
/
project-labels.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Add the label to cards
on:
workflow_dispatch:
project_card:
types: [moved]
jobs:
add-label-to-issue:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
if: github.event_name == 'project_card' && github.event.project_card.content_url && github.event.project_card.column_id == 13354989
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = await github.request(context.payload.project_card.content_url)
github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.data.number,
labels: ['live'],
});
- uses: actions/github-script@v3
if: github.event_name == 'project_card' && github.event.project_card.content_url && github.event.project_card.column_id == 13354976
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = await github.request(context.payload.project_card.content_url)
github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.data.number,
labels: ['publish'],
});
remove-label-from-issue:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
if: github.event_name == 'project_card' && github.event.project_card.content_url && github.event.project_card.changes.column_id == 13354989
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = await github.request(context.payload.project_card.content_url)
github.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.data.number,
name: 'live',
});
- uses: actions/github-script@v3
if: github.event_name == 'project_card' && github.event.project_card.content_url && github.event.project_card.column_id == 13354976
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = await github.request(context.payload.project_card.content_url)
github.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.data.number,
name: 'publish',
});