Skip to content

Commit ac822aa

Browse files
committed
add names to actions
1 parent 2ae0451 commit ac822aa

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/pr_labeler.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
uses: actions/setup-python@v1
1919
with:
2020
python-version: '3.9'
21-
cache: 'pip'
2221
- run: pip install yq
2322

2423
- name: Get Reviewers
@@ -76,24 +75,24 @@ jobs:
7675
- name: Add Approved label
7776
if: |
7877
contains(github.event.comment.html_url, '/pull/') &&
79-
(contains(github.event.comment.body, '/approve') || contains(github.event.comment.body, '/approve')) &&
78+
contains(github.event.comment.body, '/approve') &&
8079
contains(steps.approvers.outputs.approvers, github.event.comment.user.login || 'null')
8180
uses: andymckay/labeler@master
8281
with:
8382
repo-token: ${{ secrets.BOT_PAT }}
84-
add-labels: 'approved, lgtm'
83+
add-labels: 'approved'
8584

8685
- name: Remove Approved label
8786
if: |
8887
contains(github.event.comment.html_url, '/pull/') &&
89-
(contains(github.event.comment.body, '/approve') || contains(github.event.comment.body, '/remove approve')) &&
88+
contains(github.event.comment.body, '/remove approve') &&
9089
contains(steps.approvers.outputs.approvers, github.event.comment.user.login || 'null')
9190
uses: andymckay/labeler@master
9291
with:
9392
repo-token: ${{ secrets.BOT_PAT }}
9493
remove-labels: 'approved'
9594

96-
- name: Add LGTM label
95+
- name: Add LGTM label - reviewers
9796
if: |
9897
contains(github.event.comment.html_url, '/pull/') &&
9998
contains(github.event.comment.body, '/lgtm') &&
@@ -104,6 +103,18 @@ jobs:
104103
repo-token: ${{ secrets.BOT_PAT }}
105104
add-labels: 'lgtm'
106105
remove-labels: 'WIP'
106+
107+
- name: Add LGTM label - approvers
108+
if: |
109+
contains(github.event.comment.html_url, '/pull/') &&
110+
contains(github.event.comment.body, '/lgtm') &&
111+
contains(steps.approvers.outputs.approvers, github.event.comment.user.login || 'null') &&
112+
github.event.issue.user.login != github.event.comment.user.login
113+
uses: andymckay/labeler@master
114+
with:
115+
repo-token: ${{ secrets.BOT_PAT }}
116+
add-labels: 'lgtm, approved'
117+
remove-labels: 'WIP'
107118

108119
- name: Remove LGTM label
109120
if: |

0 commit comments

Comments
 (0)