From a56c3cb7ced481b0756d4ed204598e7f7c85ba0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero-Cantero?= <807608+alvorithm@users.noreply.github.com> Date: Tue, 15 Sep 2026 17:43:35 +0200 Subject: [PATCH] :bug: Pass the base branch and the project when opening a PR (#11720) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :bug: 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 * :recycle: 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 --------- Signed-off-by: Álvaro Tejero Cantero --- .agents/skills/create-pr/SKILL.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.agents/skills/create-pr/SKILL.md b/.agents/skills/create-pr/SKILL.md index 703609c9a1..f285574bb8 100644 --- a/.agents/skills/create-pr/SKILL.md +++ b/.agents/skills/create-pr/SKILL.md @@ -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 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 -gh pr create --repo penpot/penpot --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 Report the PR URL and stop.