-
Notifications
You must be signed in to change notification settings - Fork 1.4k
33 lines (33 loc) · 1.07 KB
/
Remove_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
name: remove_labels
on:
pull_request_target:
types: [synchronize]
workflow_dispatch:
jobs:
remove_label:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'Tested')
name: remove label
steps:
- name: removelabel
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: "Tested",
});
- name: Post address
uses: actions/github-script@v7
if: ${{ success() }}
with:
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: "This pull-request was previously marked with the label `Tested`, but has been modified with new commits. That label has been removed."
})