forked from kamailio/kamailio
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (52 loc) · 1.8 KB
/
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
name: manage labels from comments
on: [issue_comment]
jobs:
manage:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
if: ${{ contains(github.event.comment.body, '/notstale') }}
with:
script: |
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number:context.issue.number,
name: "stale",
});
- uses: actions/github-script@v7
if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/notexpired') }}
with:
script: |
github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
state: "open",
});
- uses: actions/github-script@v7
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/notexpired') }}
with:
script: |
github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
state: "open",
});
- uses: actions/github-script@v7
if: ${{ contains(github.event.comment.body, '/notexpired') }}
with:
script: |
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: "stale",
});
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: "expired",
});