37
37
# Only run this job if the pull request has a specific label:
38
38
if : " ${{ github.event.label.name == 'autoclose: EditorConfig' }}"
39
39
40
- # Define job permissions:
41
- permissions :
42
- contents : read
43
- pull-requests : write
44
-
45
40
# Define the type of virtual host machine:
46
41
runs-on : ubuntu-latest
47
42
73
68
# Only run this job if the pull request has a specific label:
74
69
if : " ${{ github.event.label.name == 'autoclose: Contributor Guidelines' }}"
75
70
76
- # Define job permissions:
77
- permissions :
78
- contents : read
79
- pull-requests : write
80
-
81
71
# Define the type of virtual host machine:
82
72
runs-on : ubuntu-latest
83
73
@@ -109,11 +99,6 @@ jobs:
109
99
# Only run this job if the pull request has a specific label:
110
100
if : " ${{ github.event.label.name == 'autoclose: Project Conventions' }}"
111
101
112
- # Define job permissions:
113
- permissions :
114
- contents : read
115
- pull-requests : write
116
-
117
102
# Define the type of virtual host machine:
118
103
runs-on : ubuntu-latest
119
104
@@ -149,11 +134,6 @@ jobs:
149
134
# Only run this job if the pull request has a specific label:
150
135
if : " ${{ github.event.label.name == 'autoclose: Spam' }}"
151
136
152
- # Define job permissions:
153
- permissions :
154
- contents : read
155
- pull-requests : write
156
-
157
137
# Define the type of virtual host machine:
158
138
runs-on : ubuntu-latest
159
139
@@ -189,12 +169,6 @@ jobs:
189
169
# Only run this job if the pull request has a specific label:
190
170
if : " ${{ github.event.label.name == 'autoclose: Stale' }}"
191
171
192
- # Define job permissions:
193
- permissions :
194
- contents : read
195
- issues : write
196
- pull-requests : write
197
-
198
172
# Define the type of virtual host machine:
199
173
runs-on : ubuntu-latest
200
174
@@ -221,11 +195,6 @@ jobs:
221
195
# Only run this job if the pull request has a specific label:
222
196
if : " ${{ github.event.label.name == 'autoclose: Git History' }}"
223
197
224
- # Define job permissions:
225
- permissions :
226
- contents : read
227
- pull-requests : write
228
-
229
198
# Define the type of virtual host machine:
230
199
runs-on : ubuntu-latest
231
200
@@ -252,3 +221,30 @@ jobs:
252
221
We recommend opening a new pull request with only the intended changes.
253
222
254
223
Thank you for your interest in stdlib, and we look forward to your future contributions.
224
+
225
+ # Define a job which closes a pull request if proposed changes duplicate already included changes:
226
+ already_resolved :
227
+
228
+ # Define job name:
229
+ name : ' Check for already resolved label'
230
+
231
+ # Only run this job if the pull request has a specific label:
232
+ if : " ${{ github.event.label.name == 'autoclose: Already Resolved' }}"
233
+
234
+ # Define the type of virtual host machine:
235
+ runs-on : ubuntu-latest
236
+
237
+ # Define the sequence of job steps:
238
+ steps :
239
+
240
+ # Close the pull request:
241
+ - name : ' Close pull request'
242
+ run : gh pr close "$NUMBER" --comment "$BODY"
243
+ env :
244
+ GH_TOKEN : ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
245
+ GH_REPO : ${{ github.repository }}
246
+ NUMBER : ${{ github.event.pull_request.number }}
247
+ BODY : |
248
+ Thank you for working on this pull request. However, we cannot accept your contribution as the issue this pull request seeks to resolve has already been addressed in a different pull request or commit.
249
+
250
+ Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.
0 commit comments