Skip to content

ref(docs): Avoid shell redirects in PR workflow docs#5180

Merged
adinauer merged 1 commit intomainfrom
ref/avoid-shell-redirects-in-pr-docs
Mar 10, 2026
Merged

ref(docs): Avoid shell redirects in PR workflow docs#5180
adinauer merged 1 commit intomainfrom
ref/avoid-shell-redirects-in-pr-docs

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 9, 2026

📜 Description

Replaces shell redirect examples (>, >>, |, &&) with Write/Edit tool instructions in pr.mdc and the create-java-pr skill.

Three places updated:

  • pr.mdc § "Stack List in PR Description" — the update-PR-body example
  • create-java-pr Step 5.5 — stack list update instructions
  • create-java-pr Step 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 simple Bash(gh pr view *) permission pattern, causing a permission prompt for every PR in the stack.

By instructing agents to use Write/Edit tools for file I/O and keep gh commands 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 view triggered a permission prompt.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

None — self-contained change.

#skip-changelog

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.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@sentry
Copy link

sentry bot commented Mar 9, 2026

Sentry Build Distribution

App Version Configuration
SDK Size 8.34.1 (1) release

@adinauer adinauer marked this pull request as ready for review March 10, 2026 10:14
Copy link
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

One possible improvement: We could tell the agent to delete the temp file after updating.

@adinauer adinauer merged commit 9770665 into main Mar 10, 2026
67 checks passed
@adinauer adinauer deleted the ref/avoid-shell-redirects-in-pr-docs branch March 10, 2026 10:34
@adinauer
Copy link
Member Author

One possible improvement: We could tell the agent to delete the temp file after updating.

Yeah we could do that in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants