🐛 Pass the base branch and the project when opening a PR (#11720)

* 🐛 Pass the base branch and the project when opening a PR

The create-pr skill resolves the target branch with
scripts/detect-target-branch in step 1 and then never passes it, so
gh opens the PR against the repository default. A branch cut from
staging therefore targets develop. mem:workflow/creating-prs also
requires --project "Main", which the skill's command omitted.

Two checks were missing as well. A branch behind its base produces a
verdict about a tree nobody will ship, because checks run against head
merged into base. A draft PR runs no checks at all, since every test
workflow is gated on the pull_request.draft flag, so the skill now
asks before opening one and states that cost.

Finally, the AI-assisted-by trailer belongs in the PR body: Penpot
squash-merges, so the landed commit message comes from the PR title
and body, and a trailer that lives only on branch commits disappears
at merge.

AI-assisted-by: claude-opus-5
Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>

* ♻️ Drop the behind-the-base check and fix the trailer note

Review found both claims wrong. The behind-the-base check said the
checks would report on a tree nobody ships, but every test workflow
runs actions/checkout with no ref, so a pull_request event builds
refs/pull/N/merge, which is head already merged into base. Being
behind the base therefore changes nothing about the verdict, and the
check only forced a rebase for no gain.

The trailer note claimed a trailer on branch commits disappears at
merge. It does not: GitHub's squash body lists the commit messages,
and 91b433985a carries three AI-assisted-by lines from the two
commits of #11677. The paragraph now asks for the trailer in the body
as a courtesy to the reviewer, once per model, and says the commits
keep theirs.

AI-assisted-by: claude-opus-5
Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>

---------

Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>
This commit is contained in:
Álvaro Tejero-Cantero 2026-09-15 17:43:35 +02:00 committed by GitHub
parent 4a5c6fce7f
commit a56c3cb7ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -75,10 +75,23 @@ description structure, writing principles) and `mem:workflow/creating-commits`
(commit type emojis). Derive the title and body from the commits and, when (commit type emojis). Derive the title and body from the commits and, when
there is one, from the issue body. Reference the issue with `Closes #NNNN`. there is one, from the issue body. Reference the issue with `Closes #NNNN`.
Repeat the `AI-assisted-by:` trailer in the body, once per model that worked
on the branch, so the PR states the assistance where a reviewer reads it. The
branch commits keep their own trailers, and a squash merge carries every one
of them into the landed message.
Before offering or accepting a draft PR, warn that CI doesn't run on them. Add
`--draft` only when the user agrees to that.
```bash ```bash
gh pr create --repo penpot/penpot --title "<TITLE>" --body-file /tmp/pr-body.md gh pr create --repo penpot/penpot --base "<BASE>" --title "<TITLE>" \
--project "Main" --body-file /tmp/pr-body.md
``` ```
`--base` is the branch resolved in step 1: without it the PR opens against the
repository default, which is wrong for a branch cut from `staging`. `--project
"Main"` is required by `mem:workflow/creating-prs`.
### 5. Report ### 5. Report
Report the PR URL and stop. Report the PR URL and stop.