mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1847997: Automatically close GitHub pull requests with a GitHub Action r=hwine DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D185836
This commit is contained in:
parent
d7740874a5
commit
774d6c8538
7
.github/workflows/README
vendored
Normal file
7
.github/workflows/README
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
IMPORTANT
|
||||
|
||||
All changes and/or additions to GitHub Workflows MUST be approved by the
|
||||
Mozilla GitHub Enterprise Administrators Team.
|
||||
|
||||
See https://mozilla-hub.atlassian.net/l/cp/f5ypVsa7 for contact information, or
|
||||
reach out on Matrix: https://chat.mozilla.org/#/room/#github-admin:mozilla.org
|
17
.github/workflows/close-pr.yml
vendored
Normal file
17
.github/workflows/close-pr.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: close pull request
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened]
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: close
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
PR=$(echo "$GITHUB_REF" | awk 'BEGIN { FS = "/" } ; { print $3 }')
|
||||
gh pr close $PR --comment "(Automated Close) Please do not file pull requests here, see https://firefox-source-docs.mozilla.org/contributing/how_to_submit_a_patch.html"
|
||||
gh pr lock $PR
|
Loading…
Reference in New Issue
Block a user