-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Labels
enhancementa request to improve CLIa request to improve CLIgh-reporelating to the gh repo commandrelating to the gh repo commandhelp wantedContributions welcomeContributions welcome
Description
Describe the feature or problem you’d like to solve
I would like to be able to call gh repo edit ... to set these flags on the repository:
- Allow squash merging (
--enable-squash-merge):squash_merge_commit_title=PR_TITLE|COMMIT_OR_PR_TITLEsquash_merge_commit_message=PR_BODY|COMMIT_MESSAGES|BLANK
- Allow merge commits (
--enable-merge-commit):merge_commit_title=PR_TITLE|MERGE_MESSAGEmerge_commit_message=PR_BODY|PR_TITLE|BLANK
Note: ignore use_squash_pr_title_as_default as it's deprecated.
Proposed solution
Modify https://github.com/cli/cli/blob/trunk/pkg/cmd/repo/edit/edit.go
Augment gh repo edit --enable-squash-merge option to allow for values other than =false, e.g. --enable-squash-merge=pr-title-and-body. Same for --enable-merge-commit.
or
Create 4 new separate options to mirror the Repository REST API.
Additional context
Issue is about setting these dropdowns from CLI:


For SEO the values of the dropdown are:
- Default message
- Default to pull request title
- Default to pull request title and commit details
- Default to pull request title and description
igallart, VOVELEE, bholland-bh, lanni-energinet and iamazeem
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLIgh-reporelating to the gh repo commandrelating to the gh repo commandhelp wantedContributions welcomeContributions welcome