Commit graph

636 commits

Author SHA1 Message Date
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
Babak K. Shandiz
171e8d33f8
Print message on stdout instead of stderr
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-16 15:02:22 +01:00
Babak K. Shandiz
c70479ac5d
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update 2024-07-16 14:57:33 +01:00
Andy Feller
ae5a71bbe4
Merge branch 'trunk' into add-issue-create-editor 2024-07-15 15:21:03 -04:00
William Martin
940b54c708 Add tests for JSON field support on issue and pr view commands 2024-07-12 17:35:54 +02:00
notomo
0d37174076 Add editor hint message 2024-07-09 21:01:50 +09:00
notomo
8f77b4a23f Add issue create --editor 2024-07-09 21:01:50 +09:00
Babak K. Shandiz
8ac5ad7244
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update 2024-06-07 15:40:28 +01:00
William Martin
a66a646ca5 Add comment to pr diff regex 2024-05-23 11:59:56 +02:00
Katsuhiko Anda
e5e5c4fc43 Update regex in changedFilesNames to handle quoted paths 2024-05-23 03:13:16 +00:00
Andy Feller
ac5510362b Implement ExportData to filter json fields
In order to filter json fields, the `ExportData` interface needed to be implemented with logic that iterated on the selected fields.
2024-05-14 09:49:07 -04:00
nobe4
8a1995c98d
fix: rename fields list 2024-05-14 08:06:54 +02:00
nobe4
178fc2e51e
feat: add json output for PR checks 2024-05-14 07:57:38 +02:00
William Martin
07e0ff7127 Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Babak K. Shandiz
859337f2e2
Merge branch 'trunk' into 8426-add-pr-update-cmd-no-local-update
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-09 21:07:05 +01:00
William Martin
5007c18f5f Fix unused params across project 2024-05-07 17:50:43 +02:00
Babak K. Shandiz
119e58c091
Update tests to account for ref comparison step
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-07 00:19:54 +01:00
Babak K. Shandiz
81df8638cb
Check if PR branch is already up-to-date
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 23:57:53 +01:00
Babak K. Shandiz
07f954229f
Add test to verify --repo requires non-empty selector
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-14 12:25:35 +01:00
Babak K. Shandiz
f85d0ebaed
Require non-empty selector when --repo override is used
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-14 12:25:01 +01:00
Babak K. Shandiz
9230b0c60e
Register update command
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-10 19:21:20 +01:00
Babak K. Shandiz
a81cf0b89e
Add tests for pr update command
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-10 19:20:59 +01:00
Babak K. Shandiz
a828e05baa
Add pr update command
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-10 19:20:44 +01:00
Victor Martinez
c0658b7ab4
feat: support dry-run in gh pr create (#8376) 2024-03-14 16:28:53 +01:00
Andy Feller
2b2571eb23 Fix breaking test for PR/issue # change 2024-03-01 16:04:24 -05:00
Andy Feller
bcdc917f08 Enhance 2nd round of issue and PR number output 2024-03-01 15:42:43 -05:00
Andy Feller
3bb5f54073 Apply first round of owner/repo#number consistency
This commit expands on @nobe4 initial work by bringing the owner and repository name to the most obvious issue and PR number output use cases before making a second pass for any edge cases.
2024-03-01 14:03:18 -05:00
nobe4
a5b7c6122d
fix: format files 2024-03-01 13:35:09 +01:00
nobe4
db93444ba9
feat(merge): add owner/repo in prompt
Various places during the `gh pr merge` flow show the PR number and
title. Those places are updated to also show the owner/repo.

E.g.
Before:
  Pull request #123 (title) is ready to be merged
After:
  Pull request owner/repo#123 (title) is ready to be merged

There are other places, where only the number is displayed. Those were
intentionally left as is. It made sense to show the owner/repo only when
the extra context of the title was present.

It also fixes the related tests.

cc #8777
2024-03-01 13:26:20 +01:00
William Martin
2ee6737053 Use regex to split apart the git client Commit logs
Theoretically this should be clearer and more robust than the previous
version which had some custom loop logic while trying to parse newlines
and determine whether it had reached a new commit entry by trying to parse
a git sha. This would not have worked correctly if a commit body contained
a sha on a new line.
2024-02-27 20:49:00 +01:00
William Martin
2b0484f5aa Use null byte separators when fetching comments from git 2024-02-27 18:00:40 +01:00
William Martin
658e7ac889 Ensure PRs with one commit have title and body prefilled 2024-02-16 16:30:44 +01:00
William Martin
14617e59e9 Update test to run against trunk 2024-02-16 16:30:00 +01:00
William Martin
237f6e3435 Test PR create uses commit title and body when only one commit 2024-02-16 16:19:02 +01:00
Zack Sloane
f70bcba779 switch to [] characters for default info in usage strings 2024-02-01 21:35:31 +00:00
Zack Sloane
15166f485a
Merge branch 'cli:trunk' into trunk 2024-02-01 16:27:12 -05:00
Federico Guerinoni
3409d068d4 Make commit title in bold 2024-02-01 09:12:06 +01:00
Federico Guerinoni
42613172bd pr: Add flag fillverbose
This is used to fill the body of PR with all commits msg + body
of every commits because there can be lot of useful information.

Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
2024-02-01 09:12:04 +01:00
Arun
e623f70a47
Specify refspec to push to the correct branch in the event of a conflicting tag 2024-01-24 11:14:35 -08:00