18
18
uses : actions/setup-python@v1
19
19
with :
20
20
python-version : ' 3.9'
21
- cache : ' pip'
22
21
- run : pip install yq
23
22
24
23
- name : Get Reviewers
@@ -76,24 +75,24 @@ jobs:
76
75
- name : Add Approved label
77
76
if : |
78
77
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') &&
80
79
contains(steps.approvers.outputs.approvers, github.event.comment.user.login || 'null')
81
80
uses : andymckay/labeler@master
82
81
with :
83
82
repo-token : ${{ secrets.BOT_PAT }}
84
- add-labels : ' approved, lgtm '
83
+ add-labels : ' approved'
85
84
86
85
- name : Remove Approved label
87
86
if : |
88
87
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') &&
90
89
contains(steps.approvers.outputs.approvers, github.event.comment.user.login || 'null')
91
90
uses : andymckay/labeler@master
92
91
with :
93
92
repo-token : ${{ secrets.BOT_PAT }}
94
93
remove-labels : ' approved'
95
94
96
- - name : Add LGTM label
95
+ - name : Add LGTM label - reviewers
97
96
if : |
98
97
contains(github.event.comment.html_url, '/pull/') &&
99
98
contains(github.event.comment.body, '/lgtm') &&
@@ -104,6 +103,18 @@ jobs:
104
103
repo-token : ${{ secrets.BOT_PAT }}
105
104
add-labels : ' lgtm'
106
105
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'
107
118
108
119
- name : Remove LGTM label
109
120
if : |
0 commit comments