ref(docs): Avoid shell redirects in PR workflow docs#5180
Merged
Conversation
Replace shell redirect examples (>, >>, |, &&) with Write/Edit tool instructions in pr.mdc and create-java-pr skill. This prevents permission prompt spam when agents update PR descriptions, since compound shell commands don't match simple permission patterns.
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Sentry Build Distribution
|
lbloder
approved these changes
Mar 10, 2026
Collaborator
lbloder
left a comment
There was a problem hiding this comment.
LGTM 👍
One possible improvement: We could tell the agent to delete the temp file after updating.
Member
Author
Yeah we could do that in the future |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Replaces shell redirect examples (
>,>>,|,&&) withWrite/Edittool instructions inpr.mdcand thecreate-java-prskill.Three places updated:
pr.mdc§ "Stack List in PR Description" — the update-PR-body examplecreate-java-prStep 5.5 — stack list update instructionscreate-java-prStep 6 — skip-changelog instructions💡 Motivation and Context
When agents follow the current examples literally, they run compound shell commands like
gh pr view 5172 --json body --jq '.body' > /tmp/pr-body.md. The>redirect makes it a compound shell expression that no longer matches the simpleBash(gh pr view *)permission pattern, causing a permission prompt for every PR in the stack.By instructing agents to use
Write/Edittools for file I/O and keepghcommands simple, the existing permission patterns work without extra approvals.💚 How did you test it?
Manual review of the instructions. The issue was observed during a stacked PR workflow where every
gh pr viewtriggered a permission prompt.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None — self-contained change.
#skip-changelog