Repository navigation
Add "Signed-off-by" trailer option to commit options menu - #21741
Conversation
Co-authored-by: niik <[email protected]>
|
|
||
| private get isCommitOptionsButtonEnabled() { | ||
| return enableHooksEnvironment() && this.props.hasCommitHooks | ||
| return enableHooksEnvironment() |
There was a problem hiding this comment.
@copilot This would always be enabled now right? We could just remove the isCommitOptionsButtonEnabled but we have to conditionalize whether the "Bypass commit hooks" context menu item is visible depending on whether enableHooksEnvironment is true AND hasCommitHooks
There was a problem hiding this comment.
Done in 75fd4cd. Removed isCommitOptionsButtonEnabled entirely (and the now-redundant isActionBarEnabled getter). The button is rendered unconditionally, and the "Bypass Commit hooks" item is now conditionally pushed into the menu array only when enableHooksEnvironment() && this.props.hasCommitHooks.
…show button unconditionally, conditionalize Bypass Commit Hooks menu item on hooks environment and hasCommitHooks Co-authored-by: niik <[email protected]>
|
This option is missing from the documentation https://docs.github.com/en/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop description and screenshots. |
Many open source projects require Developer Certificate of Origin (DCO) sign-off on commits. GitHub Desktop had no way to add
Signed-off-bytrailers without amending via CLI or manually inserting the line.Description
Adds a "Add Signed-off-by trailer" toggle to the commit options (gear) menu. When enabled for a repository, commits are passed
--signoff, appendingSigned-off-by: Name <email>from the user's git identity. The option is per-repository and resets on app restart (matching theskipCommitHooksbehavior and git's own stance on not supporting a config option for this).app-state.ts: AddedsignOffCommits: booleantoIRepositoryState; expandedCommitOptionstoPick<IRepositoryState, 'skipCommitHooks' | 'signOffCommits'>repository-state-cache.ts: DefaultsignOffCommits: falsecommit.ts: AddedsignOff?: booleantocreateCommitoptions → appends--signoffto git argsapp-store.ts: PassessignOff: state.signOffCommitsintocreateCommitcommit-message.tsx: AddedsignOffCommitsprop; new checkbox menu item in commit options context menu; removedisCommitOptionsButtonEnabled(was gated onhasCommitHooks) — the button is now always rendered since the sign-off option is always available; the "Bypass Commit hooks" menu item is conditionally shown only whenenableHooksEnvironment() && hasCommitHooks; gear icon losesdefault-optionsstyling when either option is activesidebar.tsx,repository.tsx,filter-changes-list.tsx,app.tsx,commit-message-dialog.tsx) updated to propagate the new propScreenshots
Commit options menu with the new toggle:
Release notes
Notes: [Added] Add option to include a Signed-off-by trailer on commits for Developer Certificate of Origin workflows
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.