Commit graph

723 commits

Author SHA1 Message Date
Nilln
ef3a1ced20
Merge branch 'trunk' into nil/fix-2329 2025-01-11 10:59:22 +11:00
William Martin
c3b41e87b8 Panic mustParseTrackingRef if format is incorrect 2025-01-06 10:33:28 -06:00
William Martin
8b5073d617 Move trackingRef into pr create package 2025-01-06 10:33:28 -06:00
William Martin
62ecb1c84d Make tryDetermineTrackingRef tests more respective of reality
Though it doesn't really matter, in practice upstream is always going to come before origin.
2025-01-06 10:33:28 -06:00
William Martin
57ba5e5608 Rework tryDetermineTrackingRef tests 2025-01-06 10:33:28 -06:00
William Martin
b8c167970b Avoid pointer return from determineTrackingBranch 2025-01-06 10:33:28 -06:00
William Martin
27bd4b2aec Doc determineTrackingBranch 2025-01-06 10:33:28 -06:00
William Martin
05764b8114 Don't use pointer for determineTrackingBranch branchConfig 2025-01-06 10:33:28 -06:00
William Martin
dc077dc09b Panic if tracking ref can't be reconstructed 2025-01-06 10:33:28 -06:00
William Martin
3ae4e5da20 Document and rework pr create tracking branch lookup 2025-01-06 10:33:28 -06:00
Caleb Brose
67749480d5
Fix test 2025-01-03 20:45:20 +00:00
Caleb Brose
9d490547b8
Alternative: remove LocalBranch from BranchConfig 2025-01-03 20:39:12 +00:00
Heath Stewart
78836097c3
Document how to set gh-merge-base
Follow-up to PR #9712
2024-12-20 10:49:38 -08:00
nilvng
3987f4af4a chore: remove unused file 2024-12-15 18:08:45 +11:00
nilvng
55598d0a2c feat: integrate new PRLister into pr list command 2024-12-15 18:04:51 +11:00
nilvng
91b3b99b76 issue #2329: create shared PRLister 2024-12-15 17:53:00 +11:00
nilvng
d7cabf18f7 fix: tab format may break checkout prompts 2024-12-15 13:55:47 +11:00
nilvng
1f525bf175 issue #2329: handle empty list of PR 2024-12-15 12:34:46 +11:00
Nilln
de13d7b721
Merge branch 'trunk' into nil/fix-2329 2024-12-14 11:03:22 +11:00
William Martin
d662226ae4 Name conditionals in PR finder 2024-12-13 14:33:33 +01:00
William Martin
96ac8d6a2f Support pr view for intra-org forks 2024-12-13 14:27:41 +01:00
Kynan Ware
253b082600 Return err instead of silentError in merge queue check 2024-12-12 15:54:01 -07:00
Kynan Ware
439cfa08bb Exit on pr merge with -d and merge queue
When running `gh pr merge -d` on a repo with a merge queue policy, exit before attempting to merge.
2024-12-12 14:49:38 -07:00
William Martin
54a7f4de70 Revert "Confirm auto-detected base branch"
This reverts commit e021a07285.
2024-12-09 13:01:00 +01:00
Nilln
26798213f0
Merge branch 'trunk' into nil/fix-2329 2024-12-09 21:59:25 +11:00
nilvng
5109336963 issue #2329: include PR status in the prompt's options 2024-12-09 21:22:00 +11:00
nilvng
4bc90101cd issue #2329: fix prompt header getting duplicated
following the approach in gh run view seems to fix this issue
2024-12-09 21:20:07 +11:00
Heath Stewart
e021a07285
Confirm auto-detected base branch
If interactive, confirm the automatically configured gh-merge-branch or, if not configured, the default branch.

Based on PR feedback.
2024-12-08 22:27:00 -08:00
Heath Stewart
5da86e07e7
Merge changes from #10004
Merges changes from @williammartin including acceptance tests and word changes.

Co-authored-by: William Martin <williammartin@github.com>
2024-12-08 20:34:21 -08:00
Heath Stewart
3d139019f8
Open PR against gh-merge-base
Partly resolves issue #8979 by checking for a `gh-merge-base` branch tag and using that as though it were passed to `gh pr create --base`.
2024-12-08 17:40:00 -08:00
nilvng
409e3ca08c issue #2329: simplify the UI of the prompt
This commit reverts the previous color changes in the prompt UI. While color highlighting could potentially improve the visual appealing of the prompt
using the existing color library (mguz/ansi) with the prompt library (AlecAivazis/survey) caused unintended side effects.
It reset the bold text style for the selected option. We decide to that
bold text style would have a higher priority than the color text ,for
three reasons:
1. To maintain consistency with other prompts in the UI and prioritize accessibility
2. While color can enhance the user experience, according to Primer Design Guidelines, color should not be relied upon to convey essential information.
3. visual indicator of the selected option, especially crucial when dealing with long PR titles or branch names.

As a future improvement, we may consider a separate issue or PR to address the color library issue and explore controlled color usage in prompts. This could potentially allow for more nuanced visual differentiation while avoiding unintended style resets.

Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-06 19:59:46 +11:00
nilvng
eced54c904 issue #2329: update the prompt's format
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-06 18:49:43 +11:00
nilvng
12479e3072 issue #2329: fix unit tests 2024-12-06 18:19:07 +11:00
Andy Feller
c9ecf310b3 Error for mutually exclusive json and watch flags
Closes #10013

This commit enhances `gh pr checks` to exit with an error when mutually exclusive `--json` and `--watch` flags are used.  Users are encouraged to either 1) retrieve information about the checks via `--json` or 2) watch and wait on PR checks that are being updated.
2024-12-05 10:23:13 -05:00
Kynan Ware
490bfdac03 issue cli#2329: Fix linter 2024-12-04 14:41:30 -07:00
Kynan Ware
1d19878bc4
Merge branch 'trunk' into nil/fix-2329 2024-12-04 14:37:57 -07:00
nilvng
2a1f27ee01 issue cli#2329: fix unsufficent properties required for PR checkout
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-05 01:07:31 +11:00
nilvng
9c82156e86 issue #2329: move Interactive check to RunE
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-12-03 22:28:02 +11:00
nilvng
985118e36a fix: update the copy 2024-12-03 20:13:38 +11:00
William Martin
694e565384 Fix PR checkout panic when base repo is not in remotes 2024-12-02 17:20:57 +01:00
nilvng
d92e529629 issue #2329: return error when not running interactively 2024-12-01 22:37:53 +11:00
nilvng
e4dced01f7 issue #2329: fix missing stub 2024-11-30 23:51:00 +11:00
Kynan Ware
9c550992ea
Merge branch 'trunk' into nil/fix-2329 2024-11-28 10:10:45 -07:00
William Martin
bd44d33eaa Add checkout test that uses ssh git remote url 2024-11-27 13:06:35 +01:00
William Martin
72a6fd00a4 Rename backwards compatible credentials pattern 2024-11-27 12:21:55 +01:00
William Martin
efd8ff6d46 General cleanup and docs 2024-11-26 22:30:11 +01:00
William Martin
6b7f1ff060 Allow client fetch to use insecure credentials pattern 2024-11-26 22:30:03 +01:00
William Martin
7affcadb5e Allow client push to use insecure credential pattern 2024-11-26 22:29:58 +01:00
William Martin
75712de712 Allow client pull to use insecure credential pattern 2024-11-26 22:29:51 +01:00
William Martin
46922694dc Support secure credential pattern 2024-11-26 22:29:38 +01:00