Fix push-to-pull-request-branch target for workflow_dispatch#138
Merged
Fix push-to-pull-request-branch target for workflow_dispatch#138
Conversation
The codegen-agentic-fix workflow is always triggered via workflow_dispatch (from codegen-check.yml), which has no PR context. The push-to-pull-request-branch safe-output defaulted to target "triggering", causing every run to fail with "requires pull request context". Set target: "*" with labels: [dependencies] so the agent can push to the PR branch identified by the pr_number input, constrained to PRs carrying the "dependencies" label (Dependabot PRs).
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the agentic codegen-fix workflow’s safe-outputs configuration so it can successfully push fixes back to a PR branch even when the workflow is invoked via workflow_dispatch (i.e., without PR event context), while restricting the capability to Dependabot-style PRs via label gating.
Changes:
- Configure
push-to-pull-request-branchsafe-output withtarget: "*"to avoid requiring triggering PR context. - Add
labels: [dependencies]constraint so pushes only apply to PRs labeleddependencies. - Regenerate/update the compiled
.lock.ymlworkflow to reflect the frontmatter change.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/codegen-agentic-fix.md | Updates safe-outputs config for push-to-pull-request-branch to work under workflow_dispatch and restrict by PR label. |
| .github/workflows/codegen-agentic-fix.lock.yml | Regenerated compiled workflow reflecting the updated safe-outputs configuration. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.
The codegen-agentic-fix workflow is always triggered via workflow_dispatch (from codegen-check.yml), which has no PR context. The push-to-pull-request-branch safe-output defaulted to target "triggering", causing every run to fail with "requires pull request context".
Set target: "*" with labels: [dependencies] so the agent can push to the PR branch identified by the pr_number input, constrained to PRs carrying the "dependencies" label (Dependabot PRs).