Merge branch 'main' of github.com:github/docs-internal into hidden-docs-alt
This commit is contained in:
39
.github/workflows/close-unwanted-pull-requests.yml
vendored
Normal file
39
.github/workflows/close-unwanted-pull-requests.yml
vendored
Normal file
@@ -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'
|
||||
})
|
||||
@@ -37,4 +37,4 @@ jobs:
|
||||
if: failure()
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. See https://github.com/github/docs-internal/actions?query=workflow%3AAlgolia
|
||||
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. Search actions for `workflow:Algolia`
|
||||
|
||||
Reference in New Issue
Block a user