Andy Feller
b4be8cbf9d
Add acceptance tests for gh variable
2024-10-17 16:03:37 -04:00
Andy Feller
e335113706
Minor polish / consistency
2024-10-17 16:02:39 -04:00
Andy Feller
e91052dd9b
Fix typo in custom command doc
2024-10-17 10:59:54 -04:00
Andy Feller
7c534e6010
Refactor env2upper, env2lower; add docs
...
This commit refactors 2 new custom commands to work more like the native env command, allowing for multiple environment variables to be set.
Additionally, the documentation on acceptance tests have been expanded to list out custom commands.
2024-10-17 10:49:17 -04:00
Andy Feller
5bbe69b1d1
Update secret note about potential failure
...
Environments are only supported for GitHub Actions with certain plans; `gh-acceptance-testing` at this time does not have this support.
2024-10-17 10:11:50 -04:00
Andy Feller
b1792403be
Add testscripts for gh secret, helper cmds
...
These are initial testscripts for confidence around core `gh secret` subcommands around 1) repository, 2) repository environment, 3) organization secrets.
Each testscript exercises the 3 core subcommands of `gh secret`: 1) setting, 2) listing, and 3) deleting each type of secret.
Note should be made that repository environments do not exist for free accounts such as `gh-acceptance-testing`.
2024-10-17 10:09:08 -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
Heath Stewart
446f66070a
Add filtered content output to docs
2024-10-15 14:39:21 -07:00
Tyler McGoffin
b98c840a7f
Merge pull request #9755 from cli/jtmcg/577
...
Update IsEnterprise and IsTenancy for orthogonality using go-gh
2024-10-15 14:09:25 -07:00
Tyler McGoffin
2d0b742cb3
Merge branch 'trunk' into jtmcg/577
2024-10-15 12:56:43 -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
0bd4e034ef
Remove unnecessary code branches
2024-10-15 12:35:35 -07:00
Tyler McGoffin
e1a39d8e2b
Add ghe.com to tests describing ghec data residency
2024-10-15 12:24:41 -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
44fdb3320d
Upgrade go-gh version to 2.11.0
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
Andy Feller
a6974cc8d6
Merge pull request #9757 from cli/wm/testscript-issues
...
Add Acceptance tests for `issue` command
2024-10-15 14:47:33 -04:00
William Martin
e37cf8b694
Fix issue creation with metadata regex
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-10-15 19:11:49 +01:00
William Martin
02599796bb
Merge pull request #9748 from cli/wm/add-acceptance-makefile
...
Add acceptance task to makefile
2024-10-15 19:11:16 +01:00
William Martin
7066bdb66f
Add comment to acceptance make target
...
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2024-10-15 17:33:18 +01:00
Heath Stewart
9e00f1e4f2
Resolve PR feedback
2024-10-14 15:08:23 -07:00
Tyler McGoffin
c1939e9c15
Merge pull request #9754 from cli/wm/acceptance-test-defer-fails
...
Ensure Acceptance defer failures are debuggable
2024-10-14 14:58:26 -07:00
Tyler McGoffin
9d80f7c6c3
Merge pull request #9756 from cli/wm/allow-single-script-targeting
...
Support `GH_ACCEPTANCE_SCRIPT` env var to target a single script
2024-10-14 14:58:04 -07:00
William Martin
6970eb36f1
Acceptance test issue command
2024-10-14 20:53:43 +02:00
William Martin
5ad4a385bb
Support GH_ACCEPTANCE_SCRIPT
2024-10-14 20:44:07 +02:00
William Martin
3b1f06a88f
Ensure Acceptance defer failures are debuggable
2024-10-14 20:27:34 +02:00
William Martin
ae37c25d25
Add acceptance task to makefile
2024-10-14 20:24:07 +02:00
William Martin
c657cfac37
Merge pull request #9745 from cli/wm/testscript-pr
...
Introduce testscript acceptance tests generally, and for the PR command specifically
2024-10-14 20:23:30 +02:00
William Martin
2a0be61d5e
Ensure pr create with metadata has assignment
2024-10-14 14:50:59 +02:00
William Martin
5e02326792
Document sharedCmds func in acceptance tests
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-10-14 14:36:34 +02:00
William Martin
f7b279db11
Correct testscript description in Acceptance readme
2024-10-14 14:35:35 +02:00
William Martin
b095d6bd58
Add link to testscript pkg documentation
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-10-14 14:33:49 +02:00
William Martin
f3589b2573
Add VSCode extension links to Acceptance README
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-10-14 14:33:17 +02:00
William Martin
c2c88b293e
Fix GH_HOST / GH_ACCEPTANCE_HOST misuse
2024-10-14 14:32:05 +02:00
William Martin
1f94cf9dac
Acceptance test PR list
2024-10-14 14:31:24 +02:00
William Martin
bfa5b6afa5
Support skipping Acceptance test cleanup
2024-10-14 13:59:55 +02:00
William Martin
4d986aaed4
Acceptance test PR creation with metadata
2024-10-14 13:54:31 +02:00
William Martin
fbc72fd2be
Suggest using legacy PAT for acceptance tests
2024-10-14 13:01:13 +02:00
William Martin
503659f11c
Add host recommendation to Acceptance test docs
2024-10-14 12:56:27 +02: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