Skip to content

Surface and control commit signing in the Commit Graph#5381

Merged
ianhattendorf merged 2 commits into
mainfrom
graph-commit-signing
Jun 25, 2026
Merged

Surface and control commit signing in the Commit Graph#5381
ianhattendorf merged 2 commits into
mainfrom
graph-commit-signing

Conversation

@ianhattendorf

@ianhattendorf ianhattendorf commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Closes #5380

Summary

Makes commit signing visible when committing working changes from the Commit Graph, and honors the VS Code setting:

image

Behavior change

With git.enableCommitSigning enabled but the repo's commit.gpgsign unset/false, Graph commits now sign (matching the built-in SCM). Anyone who relied on the Graph not signing in that configuration will now get signed commits.

Testing

  • git-cli integration tests cover the host override: with git.enableCommitSigning enabled, the commit operation requests signing (-S) and fires the signing hooks/telemetry.
  • Verified live in a running instance: the indicator appears/updates with the format label and reacts to signing-config changes; a commit with the setting enabled (no commit.gpgsign) lands signed.

@ianhattendorf ianhattendorf self-assigned this Jun 23, 2026
@augmentcode

augmentcode Bot commented Jun 23, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR surfaces commit-signing state in the Commit Graph’s WIP commit box and aligns Graph commits with VS Code’s signing behavior.

Changes:

  • WIP commits from the Graph now honor the host setting git.enableCommitSigning (previously only repo commit.gpgsign was respected).
  • Adds a key icon indicator showing when commits will be signed and which format is in use (GPG/SSH/X.509/OpenPGP).
  • Introduces an in-memory, per-repo “suppress signing” toggle that commits with --no-gpg-sign and survives repo switches for the webview session.
  • Threads the suppression flag through the Compose apply flow and adds a unit test to verify it is forwarded.
  • Extends git-cli commit operations with an explicit sign?: boolean option and defines signing precedence (explicit option > host override > repo config).
  • Adds git-cli integration tests to validate host override forcing -S and suppression defeating both override and repo config.
  • Updates Graph WIP refresh triggers so signing state updates when repo config or git.enableCommitSigning changes.
  • Adds telemetry for the signing toggle (graph/wip/signing/toggled) plus docs/constants updates.

Technical Notes: Signing success hooks now fire for explicit -S commit paths, and Graph WIP state now includes repo-level signing info to drive the UI indicator.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread packages/git/src/context.ts

Copilot AI 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

Surfaces commit-signing state in the Commit Graph’s WIP commit box and adds an in-session, per-repo toggle to temporarily suppress signing, while also aligning Graph commits with VS Code’s git.enableCommitSigning behavior (matching built-in SCM).

Changes:

  • Thread explicit signing control (sign?: boolean) through the webview → host RPC and into the git-cli commit operation (-S via host override; --no-gpg-sign for suppression).
  • Add WIP signing state to Graph WIP payloads and render a signing indicator/toggle in the commit box UI (including telemetry + docs).
  • Propagate suppression into the Compose apply flow (suppressSigning) and add integration/unit tests for precedence + forwarding.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/webviews/rpc/services/repository.ts Adds sign?: boolean to commit RPC options and stamps Graph source context onto commit operations
src/webviews/plus/graph/graphWebview.ts Refreshes WIP state when signing-related config changes; includes signing config in WIP payload
src/webviews/plus/graph/graphService.ts Extends compose plan with suppressSigning to carry the UI toggle through apply
src/webviews/plus/graph/detailsProtocol.ts Re-exports WipSigning for Graph app consumption
src/webviews/plus/graph/compose/utils.ts Forces unsigned compose-apply when suppressSigning is set
src/webviews/commitDetails/protocol.ts Adds WipSigning type and Wip.signing optional field used by Graph WIP commit UI
src/webviews/apps/plus/graph/components/gl-graph-details-panel.ts Stores per-repo suppression in session state and wires toggle + props into <gl-commit-box>
src/webviews/apps/plus/graph/components/gl-commit-box.ts Renders signing indicator/toggle UI and dispatches signing-toggle events
src/webviews/apps/plus/graph/components/gl-commit-box.css.ts Styles suppressed state (slash + dim) while keeping state non-color-dependent
src/webviews/apps/plus/graph/components/detailsState.ts Adds suppressedSigningRepos session signal that survives repo switches/panel hide-show
src/webviews/apps/plus/graph/components/detailsActions.ts Applies suppression to WIP commits (sign:false) and forwards it into compose commits
src/webviews/apps/plus/graph/components/tests/detailsActions.test.ts Adds unit test asserting compose commit forwards suppressSigning
src/constants.telemetry.ts Adds graph/wip/signing/toggled telemetry event type
packages/git/src/providers/operations.ts Adds sign?: boolean option to commit operation API contract
packages/git/src/context.ts Updates hook documentation to include explicit-sign firing from commit op when host override adds -S
packages/git-cli/src/providers/operations.ts Implements signing precedence + suppression flags and fires onSigned when -S is explicitly used
packages/git-cli/src/providers/tests/integration/operations.test.ts Adds integration tests covering override precedence and suppression behavior
packages/git-cli/src/providers/tests/integration/helpers.ts Threads GitServiceConfig into the test repo context builder
docs/telemetry-events.md Documents the new graph/wip/signing/toggled telemetry payload
CHANGELOG.md Adds changelog entries for the indicator/toggle and the behavior change honoring git.enableCommitSigning

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gitkraken-services

gitkraken-services Bot commented Jun 23, 2026

Copy link
Copy Markdown

🔴 Conflict resolved with 0% confidence

Apply conflict resolution in GitKraken

Comment gitkraken apply to apply this conflict resolution.


Resolution details

🔴 CHANGELOG.md (theirs, 0%)

accepted theirs wholesale


Generated by GitKraken at 2026-06-25 00:32:03 UTC

@ianhattendorf ianhattendorf force-pushed the graph-commit-signing branch from 83cccc1 to 229eef6 Compare June 24, 2026 14:15
Adds an explicit `-S` to the commit operation when the host-level
signing override (`git.enableCommitSigning`) is enabled, matching the
built-in Source Control commit behavior — previously only the repo's
`commit.gpgsign` Git config was respected. Fires the `onSigned` hook on
explicitly-signed commits (parity with the patch provider) and threads
a `graph` telemetry source through the commit RPC.
Surfaces the repo's signing status in the Commit Graph's working
changes (WIP) commit box — a key icon appears when commits will be
signed (repo `commit.gpgsign` or VS Code's `git.enableCommitSigning`),
with the signing format (GPG, SSH, X.509, or OpenPGP) shown on hover.

Delivers the status via the WIP payload (cached `getSigningConfig` read
during assembly) and keeps it fresh on `.git/config` edits (watcher) and
`git.enableCommitSigning` setting changes.
@ianhattendorf ianhattendorf force-pushed the graph-commit-signing branch from 229eef6 to aa6da7c Compare June 25, 2026 00:42
@ianhattendorf ianhattendorf merged commit 4e6b765 into main Jun 25, 2026
6 checks passed
@ianhattendorf ianhattendorf deleted the graph-commit-signing branch June 25, 2026 00:47
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.

Surface and control commit signing when committing from the Commit Graph

2 participants