Chris Westra
6248e62611
Use GraphQLQuery test helper
...
GraphQLMutation expects a single `input` variable
2022-09-12 11:28:49 -04:00
Chris Westra
e1b83496fa
Make sure struct fields are public
2022-09-12 10:30:38 -04:00
Chris Westra
2e98e8a4a7
Get that test mostly working
2022-09-08 17:17:06 -04:00
Chris Westra
5734df806b
FIll in all the missing stuff in the test setup
2022-09-08 12:18:37 -04:00
Chris Westra
5f3f00f909
WIP
2022-09-08 10:04:12 -04:00
Chris Westra
0e1bae7be0
WIP
2022-09-06 17:04:37 -04:00
Chris Westra
152b861001
WIP
2022-09-01 16:36:48 -04:00
Mark Woods
e876b22963
Change markdown wrap limit match terminal width ( #6016 )
2022-09-01 07:36:25 +00:00
ffalor
665e4e3446
Add new commands issue pin and issue unpin ( #5597 )
2022-08-31 10:16:45 +00:00
Chris Westra
711591c92b
WIP
2022-08-26 15:25:19 -04:00
Sam Coe
2fc0ffd0be
Fix auth refresh prompter initialization ( #6141 )
...
* Fix prompter not being initialized in auth refresh
* fix broken issue list test
2022-08-25 12:07:40 +03:00
satotake
b3ab76818c
Refactor issue list and pr list tests
...
following #6085
* Inject fake `Now` function to tests of `issue list` / `pr list`
* Remove `regexp` from the tests
2022-08-25 00:01:29 +09:00
chemotaxis
7a5ed08185
Test reasonsMap construction
...
Make sure reasons were added in the correct order.
2022-08-23 23:24:42 -04:00
chemotaxis
077ab39738
Implicitly return the nil value when no lock reason given
...
While I usually like explicitly setting all values, getting rid of
setting the empty string streamlines map construction and testing.
The reasonsMap will return the nil value because the empty string is not
in the map.
2022-08-23 23:16:15 -04:00
chemotaxis
4bb6e0d585
Alphabetize fields
2022-08-23 14:29:21 -04:00
chemotaxis
2970555cea
Update comments
2022-08-23 14:24:13 -04:00
chemotaxis
cf822e4d9c
Remove direct calls to graphql library
...
Similar to commit 45f1a71c8b
2022-08-23 01:35:19 -04:00
chemotaxis
b5c18423a4
Merge remote-tracking branch 'upstream/trunk' into gh-issue-lock
...
Add recent changes, especially changes to `api`.
2022-08-23 01:08:53 -04:00
Sam Coe
45f1a71c8b
Remove all direct calls to shurcool-graphql
2022-08-18 21:40:41 +03:00
Sam Coe
6a8deb1f5a
Integrate latest go-gh packages ( #6084 )
2022-08-18 09:04:13 +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
chemotaxis
a485303391
Merge remote-tracking branch 'upstream/trunk' into gh-issue-lock
...
Update a somewhat stale feature branch with the latest stable commits.
2022-07-26 04:23:27 -04:00
Sam Coe
074ed50b8a
Integrate go-gh API package ( #5614 )
2022-06-23 04:05:31 +01:00
Mislav Marohnić
4d9a6ecb25
pr create: ensure clear error when --body is missing in nonTTY mode
2022-05-18 19:13:59 +02:00
Sam Coe
d244346960
Replace uses of strings.Title ( #5623 )
2022-05-12 13:52:21 +00:00
Mislav Marohnić
5cb4e4d862
Merge pull request #5570 from koskeller/submit-as-draft-option-pr-create
...
pr create: add "Submit as draft" interactive option
2022-05-10 17:17:07 +02:00
Konstantin Keller
dea446d2a8
"Submit as draft" option for pr create
2022-05-03 22:20:22 +03:00
Mohammed Anas
b352648259
Fix non-working gh issue view usage example ( #5563 )
2022-05-03 07:55:00 +00:00
chemotaxis
718bb80fbd
Add failure icon
2022-04-29 00:30:02 -04:00
chemotaxis
11fde2ee29
Restructured switch statement
...
As much as I like keeping statements as flat as possible, this
not-as-flat revision just seems easier to read.
2022-04-29 00:23:36 -04:00
chemotaxis
3723ab9230
Polished things
2022-04-29 00:23:36 -04:00
chemotaxis
c429726b53
Polished error message
2022-04-29 00:23:36 -04:00
chemotaxis
e0573fa68d
Use if/else if on error checking
...
Use switch statements for regular branching code.
2022-04-29 00:23:36 -04:00
chemotaxis
fc1b929a81
Remove opts.PadlockState
...
I noticed that PadlockState didn't really have anything to do with the
LockOptions and it was easy to call an incorrect locking function that
didn't match the PadlockState.
Now, you pass in the state as an argument and you simply call the
appropriate function instead of setting PadlockState and then calling
the correct function.
- Other touch ups and refactoring
2022-04-29 00:23:36 -04:00
chemotaxis
8918cf6815
Skip unlock api call if already unlocked
2022-04-29 00:23:36 -04:00
chemotaxis
7504f5ec00
Remove opts.PadlockState
...
Rather than saving the intended lock state and calling a method
depending on the lock state, just call the method directly. By the time
you need to the padlock state, you already know which method to use; no
need to first change the lock state than call the method.
Also, refactored print/error messages that are conditional.
2022-04-29 00:19:28 -04:00
chemotaxis
32f8283c77
Refactor things
...
- Switch to underscores
- Revise error message
2022-04-29 00:17:53 -04:00
chemotaxis
e019ff9f02
Modify documentation if called from issue or pr
2022-04-28 23:56:13 -04:00
chemotaxis
364dd38bc0
Get graphql queries and mutations working
...
- Fix error if found an issue while using `gh pr lock/unlock` or vice versa
- Added additional types
- Used githubv4 types
- Added "relock" state
- If the conversation is already locked you have two choices: try to
lock it again or do nothing. Do nothing is easy. But, if you
want to change the lock reason, you need to first unlock the
conversation and then lock it again.
- Added survey to confirm if you want to relock
- Added formatted print statements
2022-04-28 23:54:22 -04:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os ( #5498 )
2022-04-26 13:07:44 +02:00
Sam Coe
db85b1d3cb
Properly handle issue and pr state options when building search queries ( #5513 )
2022-04-25 20:18:58 +02:00
Roshan Padaki
13342cb272
Don't error on list commands when no results found ( #5479 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-25 17:55:52 +00:00
Mislav Marohnić
adf274851e
Merge pull request #5396 from opelr/5346/issue-delete-confirm
...
Add 'confirm' flag for issue delete subcommand
2022-04-11 19:17:44 +02:00
Sam Coe
6fa8e4299c
Add ability to comment on close/reopen of issues/pull requests ( #5437 )
2022-04-11 17:06:35 +02:00
Christopher Nethercott
933a91e18e
Add "new" alias to "create" commands ( #5388 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-11 16:48:34 +02:00
Sam Coe
8a0c1f903c
Change issue close color from red to purple ( #5436 )
2022-04-11 11:50:55 +02:00
chemotaxis
fa470fc499
Rearrange
2022-04-11 00:38:13 -04:00
chemotaxis
ffcda8fdd4
Map parent commands to typenames
2022-04-11 00:38:13 -04:00