Commit graph

675 commits

Author SHA1 Message Date
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
William Martin
8a0d361bac Expose fullDatabaseId for PR json export 2024-07-23 13:23:10 +02:00
William Martin
32e499e090 Add examples for template usage in PR and issue creation 2024-07-23 13:14:27 +02:00
Babak K. Shandiz
5b918cfdf0
Rename package directory and files
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-17 18:52:23 +01:00
Babak K. Shandiz
5b71586f39
Rename package name to update_branch
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-17 18:50:59 +01:00
Babak K. Shandiz
b584895ad8
Rename gh pr update to gh pr update-branch
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-17 18:50:39 +01:00
Babak K. Shandiz
989152e64f
Add test case for merge conflict error
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 17:33:59 +01:00
Babak K. Shandiz
5d2378dc1d
Handle merge conflict error
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 17:30:48 +01:00
Babak K. Shandiz
497a915a46
Return error if PR is not mergeable
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 15:54:59 +01:00
Babak K. Shandiz
28c72eb5b7
Replace literals with consts for Mergeable field values
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 15:29:11 +01:00
Babak K. Shandiz
1a6f59820e
Remove unused flag
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 15:05:43 +01:00