Skip to content

Commit ee7e63f

Browse files
fix(dx): address PR #672 iteration 3 review feedback
Address review comments from @copilot-pull-request-reviewer: - Step 4 hard checks: replaced the manual prose Signed-off-by check with a single combined verification command that asserts both GPG signature status (`%G?`) and trailer presence per commit via `git log --format='%G? %(trailers:key=Signed-off-by,valueonly...)'` — fail-fast block is now fully actionable rather than partly manual (per @copilot-pull-request-reviewer on line 75) - Step 6 gh pr create: dropped the branch-name fallback for PR title and clarified the title must be `type(scope): description`, lowercase, no JIRA ticket. If the first commit subject doesn't satisfy that, command asks user for a valid title. Prevents PR-title-lint CI failures from branch-name fallbacks like `feat/LFXV2-1697` (per @copilot-pull-request-reviewer on line 124) - Step 6 PR-body checklist: `yarn lint` -> `yarn lint:check`, added `yarn format:check` line, so checklist labels now match the gates actually run in Step 3 (per @copilot-pull-request-reviewer on line 112) Item 4 (false positive on GPG mandate, line 50) is being handled by companion PR #674 which documents the GPG-enforcement policy in CLAUDE.md and .claude/rules/commit-workflow.md. Item 5 (draft-mode contradiction at line 13) deferred pending user direction on whether to implement --draft end-to-end or remove the draft references from $ARGUMENTS interpretation. Resolves 3 of 5 review threads; 1 reply-only (false positive); 1 deferred. Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
1 parent 576a788 commit ee7e63f

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

.claude/commands/lfx-pr.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ Run these hard policy checks first (fail-fast):
7272
yarn commitlint --from origin/main --to HEAD
7373
```
7474

75-
Also verify every commit in `origin/main..HEAD` has a `Signed-off-by:` trailer **and** a valid GPG signature (`git log --format='%G?' origin/main..HEAD` — every line must be `G`). If any hard policy check fails, stop and report.
75+
Also verify every commit in `origin/main..HEAD` has both a `Signed-off-by:` trailer and a valid GPG signature:
76+
77+
```bash
78+
git log --format='%G? %(trailers:key=Signed-off-by,valueonly,separator=%x20) %h %s' origin/main..HEAD
79+
```
80+
81+
Each line must start with `G` (good GPG signature) **and** have a non-empty `Signed-off-by` value before the SHA. If any commit fails either check, stop and report.
7682

7783
Then run advisory review on:
7884

@@ -109,7 +115,8 @@ PR body template:
109115
- Screenshots placeholder
110116
- Pre-merge checklist (rendered into the PR body):
111117
- [x] `yarn check-types` clean
112-
- [x] `yarn lint` clean
118+
- [x] `yarn lint:check` clean
119+
- [x] `yarn format:check` clean
113120
- [x] `yarn test` passing
114121
- [x] `yarn build` passing (SSR safe)
115122
- [x] DCO sign-off (`--signoff`) and GPG signed (`-S`) on every commit
@@ -120,7 +127,11 @@ PR body template:
120127

121128
- Footer: 🤖 Drafted via /lfx-pr — Claude Code
122129

123-
gh pr create --base main --title "<first commit subject or branch name>" --body-file <body>
130+
Derive the PR title from the first commit subject. It must be a valid conventional-commit title: `type(scope): description`, all lowercase, no JIRA ticket. If the first commit subject doesn't satisfy that format (e.g., the branch only has merge commits, or the subject violates the rules), ask the user for a valid title before invoking `gh`.
131+
132+
```bash
133+
gh pr create --base main --title "<conventional-commit title>" --body-file <body>
134+
```
124135

125136
If gh unavailable, print branch URL + body for manual open.
126137

0 commit comments

Comments
 (0)