Commit graph

23 commits

Author SHA1 Message Date
yuvrajangadsingh
198487e166 fix: address review feedback on squash merge commit message
- reorder if checks: validate --enable-squash-merge is set before
  checking the value, and error when --enable-squash-merge=false
- use validSquashMsgValues directly in interactive prompt instead of
  duplicating the slice
- use slices.Contains in validateSquashMergeCommitMsg
- interpolate const values in Long description instead of hardcoding
- add default clause in transformSquashMergeOpts to avoid mutating
  title/message on unknown input
- move optionDiscussions to end of const block with TODO comment
- add test for unknown input and --enable-squash-merge=false case
2026-03-10 18:27:21 +05:30
yuvrajangadsingh
3baf83a339 fix: gofmt alignment in test struct literals 2026-03-10 16:55:50 +05:30
yuvrajangadsingh
4ae0c5851b feat(repo): add --squash-merge-commit-message flag to gh repo edit
Add a single --squash-merge-commit-message flag that maps to both
squash_merge_commit_title and squash_merge_commit_message API fields.

Supported values:
- default: COMMIT_OR_PR_TITLE + COMMIT_MESSAGES
- pr-title: PR_TITLE + BLANK
- pr-title-commits: PR_TITLE + COMMIT_MESSAGES
- pr-title-description: PR_TITLE + PR_BODY

The flag requires --enable-squash-merge to be set alongside it. In
interactive mode, the squash merge commit message prompt appears when
squash merging is selected.

Closes #10092
2026-03-10 16:55:50 +05:30
Kynan Ware
ae20633ba6
Revert "[gh repo edit] Allow setting commit message defaults" 2025-02-04 13:55:37 -07:00
Azeem Sajid
e144168dde [gh repo edit] Allow setting commit title defaults 2025-02-03 15:26:05 +05:00
Tyler McGoffin
576fa8a3bc
Add test for permissions check for security and analysis edits (#1) 2025-01-03 01:29:45 -05:00
ChandranshuRao14
29371e9491 Extract logic into helper function 2024-12-26 22:52:32 -05:00
ChandranshuRao14
a542011cdc Feat: Allow setting security_and_analysis settings in gh repo edit 2024-12-24 12:59:42 -06:00
Andy Feller
3f5fc85e41 Assert stderr for gh repo edit visibility tests 2024-10-30 13:31:00 -04:00
Andy Feller
15b2db9277 Require visibility confirmation in gh repo edit
This commit modifies interactive and non-interactive behaviors around `gh repo edit` as well as providing greater information about the impact.

1. `--help` usage is expanded to highlight the most significant consequences of changing visibility
1. `--help` usage and interactive experience call out GitHub Docs content that act as source of truth about full consequences of various changes
1. `gh repo edit` interactive experience will require confirmation for any visibility change
1. `gh repo edit` interactive experience will output potential stars and watchers lose regardless of visibility transition
1. `gh repo edit` will require `--visibility` flag to include new `--accept-visibility-change-consequences` flag regardless of interactivity
2024-10-29 10:25:04 -04:00
Nate Smith
480505511c test for forking in org 2023-08-08 17:53:21 -07:00
Nate Smith
c1296194ee port more prompts and cover with new tests 2023-08-08 17:28:06 -07:00
Nate Smith
bd12522cb2 finish porting existing tests 2023-08-08 15:37:58 -07:00
Nate Smith
aed3a67749 WIP porting repo edit to opts.Prompter 2023-08-07 17:59:56 -07:00
Bruno Alla
25209ad6b1 Add --allow-update-branch to the repo edit command 2022-12-08 20:19:14 +00:00
vilmibm
41385477c3 fix linting 2022-07-27 14:15:27 -05:00
vilmibm
d5334f4115 Revert "update linter checks"
This reverts commit 40ecb8c188.
2022-07-27 13:30:41 -05:00
vilmibm
40ecb8c188 update linter checks 2022-07-26 16:06:52 -05:00
Patrick Reader
0cf2600725
strip whitespace when adding topics
closes #5934
2022-07-14 13:17:40 +01:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Gowtham Munukutla
83a6cccf2a
Add interactive repository edit functionality (#4895) 2022-03-14 17:49:03 +00:00
Mislav Marohnić
7d199fa783 repo edit: add ability to add or remove repository topics 2021-12-07 19:28:29 +01:00
Gowtham Munukutla
98217fc38c gh repo edit
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-07 19:28:29 +01:00