Tyler McGoffin
1313612245
Merge pull request #9701 from cli/jtmcg/9698
...
Add handling of empty titles for Issues and PRs
2024-10-17 14:57:57 -07:00
Tyler McGoffin
14acbe00a9
Remove . from test case for TestTitleSurvey
2024-10-17 14:45:35 -07:00
Tyler McGoffin
13ab02729b
Clean up Title Survey empty title message code
2024-10-17 14:40:17 -07:00
Andy Feller
86b4bb9956
Include startedAt, completedAt in run steps data
...
This commit expands the `Step` structure used with GitHub Actions workflow runs to include fields indicating when steps start and complete.
This information is already provided by the GitHub API, so this only involves expanding the structure, fields exported, and the associated tests.
In the future, I could see `gh` including the duration calculation which is used when viewing workflow or workflow run.
2024-10-16 19:38:10 -04:00
Tyler McGoffin
7aef6ec391
Merge pull request #9728 from heaths/issue9704
...
Supporting filtering on `gist list`
2024-10-15 16:26:13 -07:00
Tyler McGoffin
c1897f3122
Merge branch 'trunk' into jtmcg/9698
2024-10-15 15:15:31 -07:00
Heath Stewart
446f66070a
Add filtered content output to docs
2024-10-15 14:39:21 -07:00
Tyler McGoffin
ddf90c78c2
Remove IsTenancy and relevant tests from gists as they are unsupported
2024-10-15 12:41:23 -07:00
Tyler McGoffin
e1a39d8e2b
Add ghe.com to tests describing ghec data residency
2024-10-15 12:24:41 -07:00
Tyler McGoffin
4df2e7be63
Remove comment
2024-10-15 12:16:20 -07:00
Tyler McGoffin
8109594c4c
auth: Removed redundant ghauth.IsTenancy(host) check
2024-10-15 11:56:43 -07:00
Tyler McGoffin
81591a09b8
Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname
2024-10-15 11:56:43 -07:00
Tyler McGoffin
3a8417f6c7
Add test coverage to places where IsEnterprise incorrectly covers Tenancy
...
IsEnterprise currently returns `true` when `IsTenancy` returns true. We
prefer that this behavior is orthogonal. This commit adds failing tests to
the instances where IsEnterprise should not behave the same as IsTenancy.
These test cases are expected to pass with the inclusion of the coming
improvements to go-gh to handle the orthogonality of IsEnterprise and
IsTenancy.
2024-10-15 11:56:43 -07:00
Heath Stewart
9e00f1e4f2
Resolve PR feedback
2024-10-14 15:08:23 -07:00
Heath Stewart
e9d8092ffc
Don't append remaining text if more matches
2024-10-12 23:17:57 -07:00
Heath Stewart
bddadef574
Highlight matches in table and content
...
When `--filter` is passed, matches will be highlighted in the existing table. If file names match, the "n file(s)" cell will be highlighted.
When `--include-content` is additionally passed, the file name, description, and/or content will be printed like `search code` with matches highlighted.
2024-10-12 23:17:56 -07:00
Heath Stewart
86f045ef0e
Split all newlines, and output no-color to non-TTY
2024-10-12 23:17:56 -07:00
Heath Stewart
70b14215ec
Print filtered gists similar to code search
2024-10-12 23:17:56 -07:00
Heath Stewart
4eaeda580b
Show progress when filtering
...
Filtering can take a while, so show progress. This also uncovered a bug
that I wasn't checking if a filter was actually specified, resulting in
a non-nil `opts.Filter`.
2024-10-12 23:17:56 -07:00
Heath Stewart
1615f2c1e1
Simplify description
2024-10-12 23:17:56 -07:00
Tyler McGoffin
b56353dc02
Disallow use of --include-content without --filter
2024-10-12 23:17:55 -07:00
Heath Stewart
73af9f8bd9
Improve help docs
...
Also changes `--filter` argument to "expression" to coincide with some other commands' help text e.g., `--jq`.
2024-10-12 23:17:55 -07:00
Heath Stewart
34203d7e6c
Refactor filtering into existing gist list
...
Resolves feedback in issue #9704
2024-10-12 23:17:55 -07:00
Heath Stewart
2fb5687777
Improve performance
...
Filter as we get results instead of getting them all. This allows us to more easily terminate pagination when opts.Limit is reached.
2024-10-12 23:17:55 -07:00
Heath Stewart
8c6d4c9c52
Add gist search command
...
Resolves #9704
2024-10-12 23:17:52 -07:00
bagtoad
291370824b
Return nil instead of empty objects when err
2024-10-11 12:08:10 -06:00
bagtoad
b6cdbc9e22
Fix license list and view tests
2024-10-11 11:59:06 -06:00
Kynan Ware
c6c938fafe
Apply suggestions from code review
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-10-11 09:53:33 -06:00
bagtoad
9b0fc5d555
Merge branch 'bagtoad/cli-8946-list-licenses-and-gitignore-options' of https://github.com/cli/cli into bagtoad/cli-8946-list-licenses-and-gitignore-options
2024-10-09 22:51:38 -06:00
bagtoad
95ca152fea
Add examples for creating .gitignore files
2024-10-09 22:51:24 -06:00
Kynan Ware
d45777651d
Merge branch 'trunk' into bagtoad/cli-8946-list-licenses-and-gitignore-options
2024-10-09 22:42:29 -06:00
bagtoad
922a157206
Update help for license view
...
Updated `Use` to indicate that args can be an SPDX ID or license key.
Improved the examples docs to show the use of both.
2024-10-09 22:34:06 -06:00
bagtoad
9b94bee895
Refactor http error handling
2024-10-09 22:26:03 -06:00
bagtoad
8abed17a00
implement --web flag for license view
2024-10-09 22:21:26 -06:00
bagtoad
a42d3e2f79
Fix license view help doc, add LICENSE.md example
2024-10-09 21:46:41 -06:00
bagtoad
f07f49810a
Update help and fix heredoc indentation
2024-10-09 21:41:54 -06:00
bagtoad
282b3293c5
Add SPDX ID to license list output
2024-10-09 21:21:13 -06:00
bagtoad
d6c6c6b40c
Fix ExactArgs invocation
2024-10-09 21:15:16 -06:00
bagtoad
f064bda5ea
Add Long for license list indicating limitations
2024-10-09 21:10:35 -06:00
bagtoad
4ecb125c7c
Update function names
...
Licenses are no longer referred to as templates. Prefix the new license and gitignore functions with "Repo" as a more descriptive name.
2024-10-09 21:00:43 -06:00
bagtoad
c2a7756c01
Reverse repo/shared package name change
2024-10-09 20:49:29 -06:00
Tyler McGoffin
dcbd1b728c
Add test coverage for TitleSurvey change
2024-10-08 16:32:50 -07:00
Tyler McGoffin
da945314fd
Fix failing test for pr and issue create
2024-10-08 16:11:05 -07:00
Tyler McGoffin
be3b6cbd8d
Make the X in the error message red and print with io writer
2024-10-08 16:03:14 -07:00
Kynan Ware
8a1e6ac9f0
Apply suggestions from code review
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-10-08 14:00:30 -06:00
Kynan Ware
04ed1ed1a0
Merge branch 'trunk' into bagtoad/cli-8946-list-licenses-and-gitignore-options
2024-10-06 14:01:58 -06:00
bagtoad
3be44fb6e2
Move API calls to queries_repo.go
2024-10-06 11:51:16 -06:00
Scott Mcdermott
4aff4ebe12
Allow user to override markdown wrap width via $GH_MDWIDTH from environment
2024-10-04 17:43:06 -07:00
Tyler McGoffin
5fc311374a
Add handling of empty titles for Issues and PRs
...
Currently, the prompter doesn't enforce the requirement of a title for PR
and Issue creation. However, that creates the UX where a user can enter a
blank title, spend time filling out a detailed body, then fail to create
the issue or pr when the request is sent to the api because the title is
blank. This attempts to handle that before sending a request to the api,
enforcing that, when prompting, the title of an issue is not blank.
2024-10-04 10:08:48 -07:00
Tyler McGoffin
9bd75d23ee
Merge pull request #9650 from timrogers/timrogers/log-platform-fallback
...
Emit a log message when extension installation falls back to a `darwin-amd64` binary on an Apple Silicon macOS device
2024-10-03 10:19:14 -07:00