Commit graph

3587 commits

Author SHA1 Message Date
Mislav Marohnić
f30afce5da
Merge pull request #3547 from cli/pr-lookup-refactor
Eliminate API overfetching in `pr` commands
2021-05-18 18:55:00 +02:00
Mislav Marohnić
1440fd81a1 Fix broken GraphQL queries due to editing Author struct 2021-05-18 18:35:34 +02:00
Mislav Marohnić
42155c7d2d Export more IDs in issue/pr JSON payload 2021-05-18 18:19:28 +02:00
Mislav Marohnić
e758f30073 Fix preloading of pr reviews, checks, and issue/pr comments 2021-05-18 17:13:27 +02:00
Mislav Marohnić
51f7cbdfde 💅 cleanup and tests for PR finder 2021-05-18 09:59:05 +02:00
Mislav Marohnić
068ad31c14
Add support for new Ubuntu, Kali linux (#3645)
Co-authored-by: vilmibm <vilmibm@neongrid.space>
2021-05-18 08:11:47 +02:00
Mislav Marohnić
bc3bb97c43 Merge remote-tracking branch 'origin' into pr-lookup-refactor 2021-05-17 17:41:38 +02:00
Mislav Marohnić
29908d70eb
Merge pull request #3648 from cli/docs-links
Fix some docs formatting for the web
2021-05-17 17:20:39 +02:00
Mislav Marohnić
42d2da812c Preserve list fomatting in web docs for gh actions 2021-05-17 17:01:33 +02:00
Mislav Marohnić
eb35a3457c Make sure docs URLs are linked in web docs 2021-05-17 17:00:25 +02:00
Mislav Marohnić
4b0b422eb5
Add --json export functionality to repo commands (#3627) 2021-05-17 16:53:20 +02:00
Mislav Marohnić
3f3d4e38d4 Avoid crash when --json doesn't request nameWithOwner 2021-05-17 16:43:39 +02:00
Mislav Marohnić
a2307e357d Add repo list --json support 2021-05-17 16:32:01 +02:00
Mislav Marohnić
adbfb6e8de
Merge pull request #3638 from cli/release-discussion
Create a Release Discussion on every new release
2021-05-17 15:37:39 +02:00
Mislav Marohnić
301a35eedc
Merge pull request #3621 from cli/export-data
Push data serialization concern into Exporter
2021-05-17 13:43:00 +02:00
Mislav Marohnić
f2456f4820
Merge pull request #3628 from cli/json-flag-completion
Add shell completion for valid `--json` flag values
2021-05-17 12:47:54 +02:00
Mislav Marohnić
26b987aaf5
Merge pull request #3626 from cli/json-color-gray
Fix "null" display in colored JSON output
2021-05-17 12:43:55 +02:00
Mislav Marohnić
b09c1f7a6f Add shell completion for the --json flag 2021-05-12 17:35:17 +02:00
Mislav Marohnić
df2ae17b54 Bump Cobra to v1.1.3 2021-05-12 17:35:02 +02:00
Mislav Marohnić
02a2ed2f73 Add repo view --json export functionality 2021-05-12 17:05:15 +02:00
Mislav Marohnić
5f0301c990 Have Exporter.Write automatically call ExportData on given data structure 2021-05-12 17:05:15 +02:00
Mislav Marohnić
fddc888a69 Fix "null" display in colored JSON output
"null" was previously rendered in "bright black", an ANSI color that is
not guaranteed to be visible at all depending on the terminal. Switch
the color to cyan to ensure that "null" is visible.
2021-05-12 16:56:52 +02:00
Mislav Marohnić
02b7a71783
Add project layout documentation (#3587) 2021-05-11 21:21:57 +02:00
Mislav Marohnić
26d2e5c5ce Rework our pull request template (#3584) 2021-05-11 17:08:28 +02:00
Mislav Marohnić
3cbd5b4934
Add repo fork --org functionality (#3611)
Co-authored-by: Gowtham Munukutla <gowtham.m81197@gmail.com>
2021-05-10 17:09:03 +02:00
Mislav Marohnić
c50d390cf5 Fix tests 2021-05-07 22:09:58 +02:00
Mislav Marohnić
026b07d1cf
Merge pull request #3578 from g14a/fix/empty-gist-contents
Add validation to gists if contents are empty
2021-05-07 14:21:20 +02:00
Mislav Marohnić
70a9621928 💅 cleanup in gist create 2021-05-07 14:15:27 +02:00
Gowtham Munukutla
cc94dc762d shift gist validation to server rather than client 2021-05-07 14:12:00 +02:00
Cristian Dominguez
2f94adabb2
Use T.TempDir for temporary dirs in tests (#3580) 2021-05-07 12:21:26 +02:00
Mislav Marohnić
25d79c4e16
Merge pull request #3525 from cristiand391/improve-issue-status-detection
Improve issue status detection
2021-05-03 21:04:35 +02:00
Cristian Dominguez
796d2e24ef Bring back Closed field 2021-04-30 17:32:16 -03:00
Mislav Marohnić
9bdc63c4ca Eliminate API overfetching in pr commands
This completely rewrites the PR lookup mechanism so that the caller
must specify the GraphQL fields to query for each PR. Additionally, this
fixes some export problems with `pr view --json`.

Features:

- Each pr command now gets assigned a concept of a Finder. This makes it
  easier to stub the PR in tests without having to stub the underlying
  HTTP calls or git invocations.

- `pr view --web` is much faster since it only fetches the "url" field.

- `pr diff 123` now skips a whole API call where a whole PR was
  unnecessarily preloaded just to access its diff in a subsequent call.

- PullRequestGraphQL query builder is now used to construct queries.

- A bunch of individual commands are now freed of having to know about
  concepts such as BaseRepo, Branch, Config, or Remotes.
2021-04-30 20:34:36 +02:00
Mislav Marohnić
011e455b73
Merge pull request #3536 from rneatherway/rneatherway/placeholder-syntax
Support standard path variable replacement syntax
2021-04-30 14:29:10 +02:00
Mislav Marohnić
6a57dcfd7d 💅 cleanup placeholder implementation 2021-04-30 14:22:25 +02:00
Robin Neatherway
59b4d5cb7c Support standard path variable replacement syntax
Add support for the following synonyms:

{owner} for :owner
{repo} for :repo
{branch} for :branch
2021-04-30 14:22:25 +02:00
Mislav Marohnić
d478a65254
Merge pull request #3530 from tklauser/x-term
Use golang.org/x/term
2021-04-30 11:57:01 +02:00
Nate Smith
6b9a8608f6
Merge pull request #3537 from cli/incorrect-function
catch mintty error and add help for it
2021-04-29 16:11:58 -05:00
nate smith
9f451d9eef review feedback 2021-04-29 16:06:26 -05:00
nate smith
f4592e3f94 Revert "ignore gh.exe"
This reverts commit 15c16bd12a.
2021-04-29 16:01:15 -05:00
nate smith
15c16bd12a ignore gh.exe 2021-04-29 10:59:56 -05:00
nate smith
9110db7f7e fill in help topic 2021-04-29 10:58:40 -05:00
Mislav Marohnić
d1d49c1810
Merge pull request #3529 from cli/milestone-export-fix
Fix exporting `milestone` for issues and PRs
2021-04-29 11:52:15 +02:00
nate smith
02e9fa086d start on incorrect function error handling 2021-04-28 13:59:54 -05:00
Nate Smith
d5954e2e94
Merge pull request #3499 from cli/secret-prompt
tweak secret set to allow prompting
2021-04-28 13:28:33 -05:00
Nate Smith
cc7c2f2c9d
Merge pull request #3517 from cli/watch-404
handle 404 for annotations
2021-04-28 13:27:04 -05:00
Tobias Klauser
b586d51778 Use golang.org/x/term
The golang.org/x/crypto/ssh/terminal package is deprecated and merely a
wrapper around golang.org/x/term. Use the latter directly.
2021-04-28 18:44:36 +02:00
Mislav Marohnić
a8e025291f Fix exporting milestone for issues and PRs
There was a weird pointer bug which would cause a null milestone to
erase "milestone" fields for previous entries in the list.
2021-04-28 18:28:18 +02:00
Cristian Dominguez
6b49e21295 Improve issue status detection 2021-04-28 00:30:21 -03:00
Mislav Marohnić
9436990e18
Merge pull request #3524 from sgerrand/cmd-docs-updates
Fixes typo in `pr create` docs
2021-04-27 18:38:23 +02:00