forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close unwanted pull requests (github#16679)
* Close unwanted pull requests * Update close-unwanted-pull-requests.yml * List out files excluded
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Close unwanted pull requests | ||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/**' | ||
- '.github/CODEOWNERS' | ||
- 'translations/**' | ||
- 'assets/fonts/**' | ||
- 'data/graphql/**' | ||
- 'lib/graphql/**' | ||
- 'lib/redirects/**' | ||
- 'lib/webhooks/**' | ||
jobs: | ||
close_unwanted_pull_requests: | ||
if: github.repository == 'github/docs' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 | ||
with: | ||
script: | | ||
await github.issues.createComment({ | ||
...context.repo, | ||
issue_number: context.payload.pull_request.number, | ||
body: | ||
`Thanks for contributing! We do not accept community changes to these files at this time. | ||
- '.github/workflows/**' | ||
- '.github/CODEOWNERS' | ||
- 'translations/**' | ||
- 'assets/fonts/**' | ||
- 'data/graphql/**' | ||
- 'lib/graphql/**' | ||
- 'lib/redirects/**' | ||
- 'lib/webhooks/**'` | ||
}) | ||
await github.issues.update({ | ||
...context.repo, | ||
issue_number: context.payload.pull_request.number, | ||
state: 'closed' | ||
}) |