Skip to content

Commit 75fd006

Browse files
authored
Close unwanted pull requests (github#16679)
* Close unwanted pull requests * Update close-unwanted-pull-requests.yml * List out files excluded
1 parent fb791ff commit 75fd006

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Close unwanted pull requests
2+
on:
3+
pull_request:
4+
paths:
5+
- '.github/workflows/**'
6+
- '.github/CODEOWNERS'
7+
- 'translations/**'
8+
- 'assets/fonts/**'
9+
- 'data/graphql/**'
10+
- 'lib/graphql/**'
11+
- 'lib/redirects/**'
12+
- 'lib/webhooks/**'
13+
jobs:
14+
close_unwanted_pull_requests:
15+
if: github.repository == 'github/docs'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
19+
with:
20+
script: |
21+
await github.issues.createComment({
22+
...context.repo,
23+
issue_number: context.payload.pull_request.number,
24+
body:
25+
`Thanks for contributing! We do not accept community changes to these files at this time.
26+
- '.github/workflows/**'
27+
- '.github/CODEOWNERS'
28+
- 'translations/**'
29+
- 'assets/fonts/**'
30+
- 'data/graphql/**'
31+
- 'lib/graphql/**'
32+
- 'lib/redirects/**'
33+
- 'lib/webhooks/**'`
34+
})
35+
await github.issues.update({
36+
...context.repo,
37+
issue_number: context.payload.pull_request.number,
38+
state: 'closed'
39+
})

0 commit comments

Comments
 (0)