Skip to content

Add squash merge commit flags to gh repo edit#12609

Open
drtootsie wants to merge 1 commit intocli:trunkfrom
drtootsie:add-squash-merge-commit-flags
Open

Add squash merge commit flags to gh repo edit#12609
drtootsie wants to merge 1 commit intocli:trunkfrom
drtootsie:add-squash-merge-commit-flags

Conversation

@drtootsie
Copy link

This PR adds support for the squash_merge_commit_message and squash_merge_commit_title flags to the gh repo edit command. These flags allow users to configure the default commit title and message format when merging pull requests via squash merge.

Changes

  • Added SquashMergeCommitTitle and SquashMergeCommitMessage fields to the EditRepositoryInput struct
  • Added --squash-merge-commit-title and --squash-merge-commit-message flags to the gh repo edit command

Usage

gh repo edit --squash-merge-commit-message "PR_BODY" --squash-merge-commit-title "PR_TITLE"

Valid values for --squash-merge-commit-message:

  • PR_BODY
  • COMMIT_MESSAGES
  • BLANK

Valid values for --squash-merge-commit-title:

  • PR_TITLE
  • COMMIT_OR_PR_TITLE

Fixes #10092

This commit adds support for the squash_merge_commit_message and
squash_merge_commit_title flags to the gh repo edit command. These flags
allow users to configure the default commit title and message format when
merging pull requests via squash merge.

The new flags are:
- --squash-merge-commit-title: Sets the default value for a squash merge
  commit title (PR_TITLE or COMMIT_OR_PR_TITLE)
- --squash-merge-commit-message: Sets the default value for a squash merge
  commit message (PR_BODY, COMMIT_MESSAGES, or BLANK)

Fixes cli#10092

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@drtootsie drtootsie requested a review from a team as a code owner February 3, 2026 15:16
@drtootsie drtootsie requested a review from babakks February 3, 2026 15:16
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Feb 3, 2026
@BagToad
Copy link
Member

BagToad commented Feb 3, 2026

Hey @drtootsie, if you could rebase, that should fix the lint errors 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow setting squash merge commit message and title in gh repo edit

3 participants