Allow unsigned PR branch pushes when signed commits are disabled#32273
Conversation
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
|
There was a problem hiding this comment.
Pull request overview
Adds a push-signed-commits option to push-to-pull-request-branch so users can opt out of GraphQL signed commits and push directly with git push, which allows merge commits (multiple parents) that the GraphQL createCommitOnBranch mutation cannot represent.
Changes:
- Added
push-signed-commitsconfig option to schema, Go config struct, parser, and handler builder; plumbed aspush_signed_commitsto the JS handler. - In
push_signed_commits.cjs, whensignedCommits === false, skip GraphQL replay and rungit push origin <branch>directly, returning the local HEAD SHA. - Updated docs and added tests + changeset.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/push_to_pull_request_branch.go | Adds PushSignedCommits field and parsing. |
| pkg/workflow/push_to_pull_request_branch_test.go | Test that push-signed-commits: false reaches the handler config. |
| pkg/workflow/compiler_safe_outputs_handlers.go | Emits push_signed_commits in handler config JSON. |
| pkg/parser/schemas/main_workflow_schema.json | Schema entry for the new option. |
| docs/src/content/docs/reference/safe-outputs.md | Mentions option in safe-outputs reference. |
| docs/src/content/docs/reference/safe-outputs-pull-requests.md | Documents option for push-to-pull-request-branch. |
| actions/setup/js/types/handler-factory.d.ts | Declares push_signed_commits in HandlerConfig. |
| actions/setup/js/push_to_pull_request_branch.cjs | Reads option and forwards signedCommits to helper. |
| actions/setup/js/push_to_pull_request_branch.test.cjs | Test for option log line. |
| actions/setup/js/push_signed_commits.cjs | Direct git push branch when signedCommits === false. |
| actions/setup/js/push_signed_commits.test.cjs | Integration test for merge-commit push with signed commits disabled. |
| .changeset/patch-push-signed-commits-opt-out.md | Patch changeset note. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 11/12 changed files
- Comments generated: 0
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main and recompile |
…request-branch # Conflicts: # actions/setup/js/create_pull_request.cjs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot review all changes, apply SOLID |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in a39a17c. |
|
|
|
@copilot merge main and recompile |
…request-branch # Conflicts: # actions/setup/js/update_pull_request.cjs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Bug Fix
What was the bug?
push-to-pull-request-branchcould not push local merge commits: GraphQL signed commits cannot represent multiple parents, and the documentedpush-signed-commits: falseescape hatch was not implemented.How did you fix it?
Workflow configuration
push-signed-commitsto thepush-to-pull-request-branchschema and compiler config.push_signed_commits.Push behavior
push-signed-commits: false, skip GraphQL replay and use authenticatedgit pushdirectly.Docs and release notes