mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
22 lines
720 B
YAML
22 lines
720 B
YAML
name: No pull requests into production
|
|
|
|
# production only moves by fast-forwarding it to dev:
|
|
# git push origin origin/dev:refs/heads/production
|
|
# so any pull request that targets it gets closed.
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, reopened, edited]
|
|
branches: [production]
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
close:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
PR: ${{ github.event.pull_request.html_url }}
|
|
run: |
|
|
gh pr close "$PR" --comment "production only moves by fast-forwarding it to dev (\`git push origin origin/dev:refs/heads/production\`), so pull requests into it get closed. open this against dev instead."
|