Commit graph

79 commits

Author SHA1 Message Date
Param Patidar
20f915d5ba escape metacharacters in job name 2021-06-02 17:20:31 +00:00
Gowtham Munukutla
9c614247a6 lint fix 2021-05-21 09:36:23 +05:30
Gowtham Munukutla
605f785c70 use fuzzy abbr to display age 2021-05-21 09:33:55 +05:30
Gowtham Munukutla
bc4be19319 lint repair 2021-05-20 12:28:26 +05:30
Gowtham Munukutla
31854f0b25 add extra age column and repair tests 2021-05-20 12:24:47 +05:30
Gowtham Munukutla
6b0a07f22e Merge branch 'trunk' of https://github.com/cli/cli into feature/action-headers 2021-05-20 10:59:14 +05:30
Gowtham Munukutla
97f80740aa remove extra quotes 2021-05-07 11:17:23 +05:30
Gowtham Munukutla
0437a69967 add column headers and age column in listing runs 2021-05-04 10:51:07 +05:30
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
vilmibm
00da7f9fc1 handle 404 for annotations 2021-04-26 16:55:08 -05:00
Sam
aea6163a83
Merge pull request #3445 from adamslc/log_fix
Fix `run view --log` when steps have slashes
2021-04-20 08:13:26 -07:00
Sam Coe
75227f44d1
linter 2021-04-20 08:05:19 -07:00
Mislav Marohnić
ae99ad4fbe
Merge pull request #3461 from cli/jobs-url-enterprise
Fix requesting REST sub-resources on GHE
2021-04-20 11:31:23 +02:00
Sam Coe
c77c7ec7c9
Match logs based on job name and step number 2021-04-19 12:21:34 -07:00
Luke Adams
58d3aa878d Extract filename creation logic to seperate function 2021-04-19 10:59:36 -06:00
Mislav Marohnić
ac348b0dec Fix requesting REST sub-resources on GHE
GitHub REST resources typically return full URLs to fetch related
resources at. We used to parse those URLs to find just the path portion
and pass that in to the `REST()` function, which only accepted paths. By
doing so, we are essential de-constructing a URL just to re-assemble it
again. While re-assembling it for Enterprise, though, we would
accidentally inject an extra `api/v3/` prefix where one was not needed.

The solution is just to use raw URLs as reported by the REST API with
no modifications. This extends the `REST()` function to accept full URLs
in addition to just paths to resources.
2021-04-19 12:41:09 +02:00
Luke Adams
0822e6b4ed Fix run view --log when steps have slashes 2021-04-16 23:37:24 -06:00
vilmibm
8458c5f95d use int64 explicitly in Actions support 2021-04-15 13:32:09 -05:00
vilmibm
a2f4f725af create cache dir 2021-04-15 11:15:03 -05:00
vilmibm
e10a3f164f minor usage improvements 2021-04-13 22:43:02 -05:00
vilmibm
a85ef9273f bump run list limit 2021-04-13 22:42:38 -05:00
vilmibm
04844256dd annotation fixes 2021-04-13 22:10:32 -05:00
vilmibm
cd8ec47163 unhide actions commands 2021-04-13 22:08:06 -05:00
vilmibm
efe7aa1f78 fix small bug with startup_failure conclusion 2021-04-13 22:03:59 -05:00
Mislav Marohnić
f8c7fd1d28 Fix extracting workflow artifact to a relative path
To prevent zipslip, we verify that each extracted file would fall
strictly under the prefix of the path to extract to. However, this
yielded a false positive when extracting to `.`, which is the default
for downloading a single archive.
2021-04-13 19:15:14 +02:00
Nate Smith
a579b00dac
Merge pull request #3408 from cli/fix-run-selection
Make run selection unique
2021-04-12 18:44:07 -05:00
Sam Coe
4dd8a44ff1
make run log cache key unique 2021-04-12 16:27:51 -07:00
Sam Coe
1ddebf6396
Fix trying to read from non-existent log file 2021-04-12 16:12:52 -07:00
Sam Coe
3f3c8f2b26
Add time since run to run selection survey options 2021-04-12 16:03:47 -07:00
Sarah Edwards
0b79471024
Use --exit-status instead of -e in example 2021-04-12 15:16:12 -07:00
Nate Smith
bc681b9480
Merge pull request #3303 from cli/workflow-run
gh workflow run
2021-04-09 16:14:08 -05:00
Sam Coe
33d6017467
linter 2021-04-09 12:16:31 -07:00
Sam Coe
8a4a8dd451
Moar memory 2021-04-09 12:13:01 -07:00
Sam Coe
4a610f13cf
tweak wording 2021-04-09 09:19:15 -07:00
Sam Coe
6b2b792241
linter 2021-04-08 15:57:57 -07:00
Sam Coe
dc63480cf6
Add flag log-failed to display only logs of failed steps 2021-04-08 15:51:08 -07:00
vilmibm
f80268d966 gh workflow run 2021-04-08 16:21:06 -05:00
Nate Smith
ed0ef6ad14
Merge branch 'trunk' into display-all-the-logs 2021-04-07 20:12:47 -05:00
Nate Smith
7f02141364
obsolete TODO 2021-04-07 19:55:57 -05:00
Nate Smith
c2375205f4
golf 2021-04-07 19:55:44 -05:00
vilmibm
878bdb8d50 add an example 2021-04-07 14:48:28 -05:00
vilmibm
9b5e92e64a make test windows friendly 2021-04-07 14:47:12 -05:00
Mislav Marohnić
026dc4657a Merge remote-tracking branch 'origin' into artifact-download 2021-04-07 20:26:31 +02:00
Mislav Marohnić
a449a1a6f7 Add tests for artifact rendering in run view 2021-04-07 20:26:12 +02:00
Mislav Marohnić
6ce12c07f6 Move Artifact to the "shared" package 2021-04-07 20:26:12 +02:00
Mislav Marohnić
0e94de1ce6 Address run download feedback
- With no arguments in TTY mode, prompt which artifacts to download
- Change `--pattern` argument to be just `--name` and only do exact
  matching
- For multi-archive downloads, prefix the destination path with the name
  of the artifact
- Add tests exercising HTTP functionality
- Avoid "zipslip" path injection when extracting ZIP files
- Add tests for ZIP extraction
2021-04-07 19:56:28 +02:00
vilmibm
65524f1ea8 review feedback 2021-04-07 12:19:47 -05:00
Sam Coe
5cb4ece754
Renaming and cleanup 2021-04-07 10:10:11 -07:00
Sam Coe
67e45f1bce
Display all run logs 2021-04-07 09:31:59 -07:00
vilmibm
c8e481e165 gh run watch 2021-04-06 20:27:09 -05:00