Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/minor-add-pr-branch-checkout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"gh-aw": minor
---

Add PR branch checkout when pull request context is available

When a workflow is triggered by pull_request events or comments on pull requests, the repository is now automatically checked out to the actual PR branch instead of remaining in a detached HEAD state. This enables agentic jobs to make commits and push changes to the PR branch.

The implementation uses JavaScript with actions/github-script@v8 and exec.exec from @actions/exec for better maintainability. The checkout step is added after git configuration for all workflows with contents: read permission and uses runtime conditions to only execute when PR context is available.
37 changes: 37 additions & 0 deletions .github/workflows/artifacts-summary.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .github/workflows/audit-workflows.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 37 additions & 17 deletions .github/workflows/brave.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .github/workflows/changeset-generator.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .github/workflows/ci-doctor.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .github/workflows/cli-version-checker.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .github/workflows/dev.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .github/workflows/duplicate-code-detector.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading