Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/pr-body.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ on:
the same as an unset one, so this default stays the one place that value lives.
type: string
default: ""
deny-branches:
description: >-
ERE; a PR whose head branch matches fails the `branch` job. A generic session name says
nothing about the change, in the PR list or in `git log`. Empty turns the check off.
type: string
default: "^claude/project-thread-"

concurrency:
group: pr-body-${{ github.event.pull_request.number }}
Expand All @@ -36,6 +42,20 @@ permissions:
pull-requests: write

jobs:
branch:
if: github.event.pull_request.state == 'open'
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
DENY: ${{ inputs.deny-branches }}
run: |
if [ -n "$DENY" ] && grep -Eq -- "$DENY" <<<"$HEAD_REF"; then
echo "::error::branch '$HEAD_REF' matches '$DENY': push the work to claude/<issue-number>-<short-kebab-slug> (git push -u origin HEAD:claude/<issue>-<slug>) and open the PR from it"
exit 1
fi

fill:
if: >-
github.event.pull_request.head.repo.full_name == github.repository
Expand Down
1 change: 1 addition & 0 deletions docs/4-reference_workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ jobs:
| `devkit-ref` | *(required)* | pin to the same tag as `uses:` |
| `devkit-repo` | `marola-dev/marola-devkit` | |
| `umbrella` | `""` | MAROLA_UMBRELLA — resolves a MIP-scoped branch's doc link when this repo carries no `docs/MIPs/` of its own |
| `deny-branches` | `^claude/project-thread-` | ERE: the `branch` job fails a PR whose head branch matches, so a generic session name never reaches review. Empty turns it off |

`umbrella` defaults to empty, not `marola-dev/marola`: an empty `MAROLA_UMBRELLA` env var and an
unset one are the same thing to `scripts/lib/mip_ref.sh`'s own `${MAROLA_UMBRELLA:-marola-dev/marola}`,
Expand Down
Loading