Skip to content

Allow unsigned PR branch pushes when signed commits are disabled - #32273

Merged
pelikhan merged 24 commits into
mainfrom
copilot/push-to-pull-request-branch
May 15, 2026
Merged

Allow unsigned PR branch pushes when signed commits are disabled#32273
pelikhan merged 24 commits into
mainfrom
copilot/push-to-pull-request-branch

Conversation

CopilotAI commented May 15, 2026

Copy link
Copy Markdown
Contributor

Bug Fix

What was the bug?

push-to-pull-request-branch could not push local merge commits: GraphQL signed commits cannot represent multiple parents, and the documented push-signed-commits: false escape hatch was not implemented.

How did you fix it?

  • Workflow configuration

    • Added push-signed-commits to the push-to-pull-request-branch schema and compiler config.
    • Plumbed the option into the safe-output handler as push_signed_commits.
  • Push behavior

    • When push-signed-commits: false, skip GraphQL replay and use authenticated git push directly.
    • Preserve existing default behavior: signed GraphQL commits remain enabled unless explicitly disabled.
  • Docs and release notes

    • Documented the option in safe-output references.
    • Added a patch changeset.
safe-outputs:
push-to-pull-request-branch:
push-signed-commits: false

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
CopilotAI changed the title [WIP] Fix merge commit blocking on push pathsAllow unsigned PR branch pushes when signed commits are disabledMay 15, 2026
CopilotAI requested a review from mrjfMay 15, 2026 03:48
@pelikhan
pelikhan marked this pull request as ready for review May 15, 2026 04:41
CopilotAI review requested due to automatic review settings May 15, 2026 04:41
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot

  • rename field to signed-commits
  • signed-commits:true means signed-commits are required
  • apply field to create-pull-request as well

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-commits config option to schema, Go config struct, parser, and handler builder; plumbed as push_signed_commits to the JS handler.
  • In push_signed_commits.cjs, when signedCommits === false, skip GraphQL replay and run git push origin <branch> directly, returning the local HEAD SHA.
  • Updated docs and added tests + changeset.
Show a summary per file
FileDescription
pkg/workflow/push_to_pull_request_branch.goAdds PushSignedCommits field and parsing.
pkg/workflow/push_to_pull_request_branch_test.goTest that push-signed-commits: false reaches the handler config.
pkg/workflow/compiler_safe_outputs_handlers.goEmits push_signed_commits in handler config JSON.
pkg/parser/schemas/main_workflow_schema.jsonSchema entry for the new option.
docs/src/content/docs/reference/safe-outputs.mdMentions option in safe-outputs reference.
docs/src/content/docs/reference/safe-outputs-pull-requests.mdDocuments option for push-to-pull-request-branch.
actions/setup/js/types/handler-factory.d.tsDeclares push_signed_commits in HandlerConfig.
actions/setup/js/push_to_pull_request_branch.cjsReads option and forwards signedCommits to helper.
actions/setup/js/push_to_pull_request_branch.test.cjsTest for option log line.
actions/setup/js/push_signed_commits.cjsDirect git push branch when signedCommits === false.
actions/setup/js/push_signed_commits.test.cjsIntegration test for merge-commit push with signed commits disabled.
.changeset/patch-push-signed-commits-opt-out.mdPatch 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

CopilotAIand others added 4 commits May 15, 2026 04:46
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>

CopilotAI commented May 15, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot

  • rename field to signed-commits...

Addressed in 1256302 with a follow-up cleanup in b40bd5d. The option is now signed-commits, defaults to required signed commits, and applies to both create-pull-request and push-to-pull-request-branch.

CopilotAI requested a review from pelikhanMay 15, 2026 04:55
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot merge main and recompile

CopilotAIand others added 2 commits May 15, 2026 05:04
…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>

CopilotAI commented May 15, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot merge main and recompile

Merged origin/main in 21922b1 and recompiled workflows in 584be01.

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot review all changes, apply SOLID

CopilotAIand others added 14 commits May 15, 2026 05:26
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>

CopilotAI commented May 15, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot review all changes, apply SOLID

Reviewed the PR changes for SOLID/design concerns and applied the cleanup in 73b13b0. The unsigned push path now exits before GraphQL-only rev-list work and shares direct push/HEAD resolution logic. Targeted JS and Go tests passed.

@pelikhan

Copy link
Copy Markdown
Collaborator

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

CopilotAI commented May 15, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot lint js

https://github.com/github/gh-aw/actions/runs/25902317206/job/76128202342#step:6:1

Fixed in a39a17c. make lint-cjs now passes, and the JS test suite/typecheck passes as well.

@github-actions

Copy link
Copy Markdown
Contributor

@copilot please summarize remaining blockers and propose next steps. (pr-sous-chef run: https://github.com/github/gh-aw/actions/runs/25913427032)

Generated by 👨‍🍳 PR Sous Chef ·

@pelikhan

Copy link
Copy Markdown
Collaborator

@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>

CopilotAI commented May 15, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot merge main and recompile

Merged latest origin/main in 5637a74 and ran make recompile; it completed without producing additional changes. make lint-cjs and the JS test suite/typecheck pass.

@pelikhan
pelikhan merged commit 2c12c50 into mainMay 15, 2026
@pelikhan
pelikhan deleted the copilot/push-to-pull-request-branch branch May 15, 2026 12:01
Copilot stopped work on behalf of pelikhan due to an error May 15, 2026 12:02
Sign up for freeto 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.

push_to_pull_request_branch: merge commits blocked by both signed and unsigned push paths

4 participants

@pelikhan@mrjf