Skip to content

Commit b121416

Browse files
DeanChensjnagug
authored andcommitted
docs(agents): Add issue closing support to PR triage skill
Update the generated Gerrit PR description to include `closes <Issue link>` footers when the PR is linked to GitHub issues, and ensure this footer is preserved during squashing. Change-Id: Ia0dc66b1e2923d07ee42561063d290847c7f29d5
1 parent 4722f22 commit b121416

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.agents/skills/adk-pr-triage/SKILL.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,12 @@ If the user selects **Local Review**, run the following structured sequence:
169169
git reset --soft $(git merge-base HEAD origin/main)
170170
git commit --author="$ORIG_AUTHOR" -m "<PR message>"
171171
```
172-
* Append `"Merge <PR link>"` to the very end of the commit message (separated by a blank line). Use this elegant shell command to do it in one-shot:
172+
* Append `"Merge <PR link>"` to the very end of the commit message (separated by a blank line). If the PR metadata contains linked issues in `closingIssuesReferences`, you MUST also append `"closes https://github.com/google/adk-python/issues/<issue_number>"` for each linked issue on new lines. Use this shell command structure to do it in one-shot:
173173
```bash
174174
git commit --amend -m "$(git log -1 --pretty=%B)
175-
Merge https://github.com/google/adk-python/pull/<pr_number>"
175+
176+
Merge https://github.com/google/adk-python/pull/<pr_number>
177+
closes https://github.com/google/adk-python/issues/<issue_number>"
176178
```
177179
* *Note*: When you run git commit/amend, the Gerrit `commit-msg` hook will automatically execute and append the `Change-Id:` footprint if not already present.
178180
4. **Step 3: Rebase on top of Main**:
@@ -185,7 +187,7 @@ If the user selects **Local Review**, run the following structured sequence:
185187
* Follow its comprehensive guidelines to audit edge cases, style compliance, dependencies, and test validation. Work in partnership with the user to revise the local changes as needed.
186188
6. **Step 5: Squash User Revisions & Push to Gerrit**:
187189
* If the user requests to push to Gerrit, squash/amend all local workspace revisions into the single original commit:
188-
* **CRITICAL**: You MUST preserve the exact same commit message, including the `Merge <PR link>` footer and the original `Change-Id:` footer. Do NOT change it.
190+
* **CRITICAL**: You MUST preserve the exact same commit message, including the `Merge <PR link>` footer, any `closes <Issue link>` footers, and the original `Change-Id:` footer. Do NOT change it.
189191
* Command to squash all changes into the current commit without opening an editor:
190192
```bash
191193
git commit -a --amend --no-edit

0 commit comments

Comments
 (0)