Commit graph

685 commits

Author SHA1 Message Date
Heath Stewart
78836097c3
Document how to set gh-merge-base
Follow-up to PR #9712
2024-12-20 10:49:38 -08: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
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
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
William Martin
694e565384 Fix PR checkout panic when base repo is not in remotes 2024-12-02 17:20:57 +01: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
Dalius Dobravolskas
9414930b5d
Adding option to return baseRefOid in pr view
You need to know exact `baseRefOid` so you could show correct diff.
`baseRefName` is not enough sometimes because branch from which PR was
forked might have changes already.

Example usage:
```
gh pr view --json headRefName,headRefOid,number,baseRefName,baseRefOid,reviewDecision
```
2024-11-19 23:50:45 +02:00
nilvng
2eaab56912 chore: tidy up 2024-11-07 10:20:23 +11:00
nilvng
874fa7ad4d feat: add test 2024-11-07 10:20:23 +11:00
nilvng
a780b488a3 fix: ignore template flag 2024-11-07 10:20:23 +11:00
Tyler McGoffin
14acbe00a9 Remove . from test case for TestTitleSurvey 2024-10-17 14:45:35 -07:00
Tyler McGoffin
13ab02729b Clean up Title Survey empty title message code 2024-10-17 14:40:17 -07:00
Tyler McGoffin
c1897f3122
Merge branch 'trunk' into jtmcg/9698 2024-10-15 15:15:31 -07:00
Tyler McGoffin
e1a39d8e2b Add ghe.com to tests describing ghec data residency 2024-10-15 12:24:41 -07:00
Tyler McGoffin
4df2e7be63 Remove comment 2024-10-15 12:16:20 -07:00
Tyler McGoffin
81591a09b8 Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname 2024-10-15 11:56:43 -07:00
Tyler McGoffin
3a8417f6c7 Add test coverage to places where IsEnterprise incorrectly covers Tenancy
IsEnterprise currently returns `true` when `IsTenancy` returns true. We
prefer that this behavior is orthogonal. This commit adds failing tests to
the instances where IsEnterprise should not behave the same as IsTenancy.

These test cases are expected to pass with the inclusion of the coming
improvements to go-gh to handle the orthogonality of IsEnterprise and
IsTenancy.
2024-10-15 11:56:43 -07:00
Tyler McGoffin
dcbd1b728c Add test coverage for TitleSurvey change 2024-10-08 16:32:50 -07:00
Tyler McGoffin
da945314fd Fix failing test for pr and issue create 2024-10-08 16:11:05 -07:00
Tyler McGoffin
be3b6cbd8d Make the X in the error message red and print with io writer 2024-10-08 16:03:14 -07:00
Tyler McGoffin
5fc311374a Add handling of empty titles for Issues and PRs
Currently, the prompter doesn't enforce the requirement of a title for PR
and Issue creation. However, that creates the UX where a user can enter a
blank title, spend time filling out a detailed body, then fail to create
the issue or pr when the request is sent to the api because the title is
blank. This attempts to handle that before sending a request to the api,
enforcing that, when prompting, the title of an issue is not blank.
2024-10-04 10:08:48 -07:00
Andy Feller
779a1203b6
Merge pull request #9471 from heaths/issue9470
Always print URL scheme to stdout
2024-08-21 14:46:52 -04:00
Arun
800f99d9fa Describe bucket and state JSON fields in pr checks command
While the `state` field corresponds 1:1 with different GitHub Actions
states, the `bucket` field is an abstraction of the CLI that lacked
documentation. This both adds documentation about the existence of the
`bucket` field and enumerates the possible values.
2024-08-16 15:26:27 -07:00
Prabhat Kumar Sahu
1886fb46ab
Fix pr checks exit code (#9452)
* Enhance  with exit code documentation

* Add new error message for PR check

* Refine gh pr checks: Add exit code 8

* Update EXIT CODES section format in man page generation
2024-08-16 14:30:11 -07:00
Heath Stewart
81f3526740
Fix tests 2024-08-16 10:11:52 -07:00
Andy Feller
a863dfdb30
Merge pull request #9433 from benebsiny/cli-9310
Add `pr create --editor`
2024-08-12 10:10:18 -04:00
Andy Feller
369a105c45 Minor grammatical fix 2024-08-12 10:00:37 -04:00
Tyler McGoffin
18d58b8d84
Replace --project.* flags' name with title in docs (#9443)
With the upcoming migration from v1 project to v2 projects, we'd like the
language in our documentation to align with v2 project language. In v2,
projects are referred to by `title` and not `name`, though they are
functionally equivalent under the hood for the CLI
2024-08-09 13:55:14 -07:00
benebsiny
e18c002283 Deduplicate the initialization of editor mode 2024-08-08 18:07:52 +08:00
benebsiny
e2275d7ef6 Add pr create --editor 2024-08-07 23:14:15 +08:00
Yukai Chou
d7b8ecf33d Unify use of tab indent in non-test source files
Found with
    rg '(^ | \t|\t )' -g '*.go' -g '!*_test.go'

Mixed indent exceptions:
- wrapped long list items with extra 2-space indent
- code snippets using space indent
- commented code lines having "\t*// \t+" prefix
2024-08-03 00:35:30 +08:00
Babak K. Shandiz
58e6196777
Fix missing variable
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 21:41:43 +01:00
Babak K. Shandiz
842562d3db
Use closure-scoped variable to catch --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 21:40:23 +01:00
Babak K. Shandiz
c9fb4ed099
Verify --milestone and --remove-milestone are not assignable at the same time
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:44:05 +01:00
Babak K. Shandiz
605b4b19e1
Assert correct parsing of --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:43:38 +01:00
Babak K. Shandiz
6dc8cc41d0
Verify --body and --body-file are not assignable at the same time 2024-07-28 15:41:54 +01:00
Babak K. Shandiz
1520292726
Add --remove-milestone option
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-28 15:40:38 +01:00
William Martin
adc8b82d11
Merge pull request #9355 from cli/wm/9241-fulldatabaseid
Expose fullDatabaseId for PR json export
2024-07-24 07:45:19 +02:00