Commit graph

125 commits

Author SHA1 Message Date
Babak K. Shandiz
3e946a356c
test(pr merge): always assert stderr
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-05 15:02:41 +01:00
Babak K. Shandiz
b1e1c8d500
test(pr merge): verify deleteRemoteBranch behaviour when API returns error
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-05 14:54:33 +01:00
Babak K. Shandiz
bafefb345e
fix(pr merge): ignore 404 as error when deleting remote branch
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-05 14:54:28 +01:00
William Martin
64370ce73e Cleanup run command stubbed finders in tests 2025-05-02 14:48:52 +02:00
Mikel Olasagasti Uranga
4396e40a31 Fix: Ensure constant format strings in fmt and printf calls
Go 1.24 introduces stricter checks for format string validation.
This commit fixes instances where non-constant format strings were
used in calls to functions like `fmt.Errorf`, `fmt.Printf`, and similar.

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2025-01-20 16:27:27 +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
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
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02: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
Andy Feller
c7c74dd422
Merge pull request #8342 from muzimuzhi/docs/unify-markup
Unify doc mark-ups
2023-12-01 09:31:36 -05:00
ffalor
74e5e84d71
Update pkg/cmd/pr/merge/merge.go
Co-authored-by: Andy Feller <andyfeller@github.com>
2023-11-30 18:51:09 -06:00
ffalor
ed68930c64 print info about merge when interactive 2023-11-26 18:44:52 -06:00
Yukai Chou
b70c28ba20 Misc docs improvements 2023-11-17 01:32:28 +08:00
Yukai Chou
17d336e005 Wrap cli flags in backticks uniformly 2023-11-16 22:54:27 +08:00
Armand Grillet
fc685f92b6
Allow deleting of local branch after merging cross repo PRs (#7709) 2023-07-25 09:03:33 -07:00
Alexander Seiler
218f29f296
Correct some typos 2023-04-21 03:51:31 +02:00
vilmibm
91445d2df3 Merge remote-tracking branch 'origin/trunk' into pr-prompter 2022-12-05 11:27:55 -08:00
Sam Coe
98ab1f2587
Authenticate network git commands (#6541) 2022-11-15 13:14:37 +02:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 (#6474) 2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression (#6472)
* Revert "Refactor to use new git client (#6447)"

This reverts commit 57fbe4f317.

* Fix pr create regression
2022-10-20 12:46:23 +03:00
vilmibm
afcfd78852 use Prompter in pr merge 2022-10-19 13:05:00 -07:00
Sam Coe
57fbe4f317
Refactor to use new git client (#6447) 2022-10-19 21:11:36 +03:00
Austin Coakley
6d4b10edf0 Added flag to pr merge allowing the selection of the merge commit email 2022-10-01 12:16:05 -05:00
Sam Coe
45f1a71c8b
Remove all direct calls to shurcool-graphql 2022-08-18 21:40:41 +03: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
ffalor
2388f51927
Add --match-head-commit field to gh pr merge (#5692)
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-06-20 17:18:00 +02:00
Ariel Deitcher
53a8737c87 pr merge: add support for Merge Queue
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-06-08 12:24:36 +02:00
Ariel Deitcher
c1345296ab
Merge pull request #5514 from mntlty/pr_merge_refactor
refactor merge command
2022-05-09 11:56:36 -07:00
Mislav Marohnić
2c178cedd5 Dis-ambiguate "currentBranch" 2022-05-04 22:38:19 +02:00
Mislav Marohnić
b9026ab862 💅 2022-05-04 22:23:52 +02:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Ariel Deitcher
c50786ed39 refactor merge command 2022-04-25 09:30:04 -07:00
Ariel Deitcher
c445529719
warn if PR is already merged (#5463) 2022-04-14 07:47:04 +00:00
Kiran Adhikari
4f7c88ea4e
pr merge: print instructions for merge conflicts (#5330)
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-13 10:28:05 +00:00
Boston Cartwright
bb9bf29835
pr merge switch to base branch if available (#5251)
* after merge, switch to base branch if available

* Add ability to checkout new branch

* Style cleanup

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-03-14 14:02:57 +02:00
Yuki Hirasawa
4f0264e37b
spelling: possible (#5157) 2022-02-02 16:54:09 +01:00
Mislav Marohnić
44775f87c8 Add nolint directives to allow-list current lint violations 2022-01-14 19:52:52 +01:00
Cristian Dominguez
f2d23d8c88
Allow editing commit subject when squash-merging a PR (#3344)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-20 18:25:17 +00:00
Tomohiro Nishimura
a9d397be69
Add --generate-notes flag to gh release create command. (#4467) 2021-12-08 15:20:59 +04:00
Parth
c987c5711d
pr merge: pull after switching branches (#4748) 2021-11-29 18:26:35 +01:00
Parth
39bd9aafdc
pr merge: allow deleting remote branch if local branch does not exist (#4769) 2021-11-24 16:50:25 +01:00
Sam Coe
260716a9f8
Repace shurcool/graphql with cli/shurcool-graphql 2021-11-17 12:57:43 -08:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Reto Hablützel
f6e9734f17 add more hints to docs 2021-09-25 08:38:26 +02:00