Commit graph

123 commits

Author SHA1 Message Date
Andy Feller
29a94ab9b1 Reformat non-documentation hostnames
Outside of the hostnames previously fixed, I talked with @williammartin about what to do with the remaining references and the concern about the mixed format.

One suggestion for the error / test use case was to remove the extraneous text all together.
2025-07-14 08:43:15 -04:00
William Martin
502b64582d Support --no-repos-selected on secret set 2025-07-03 17:02:28 +02:00
William Martin
e51b03d989
Merge pull request #10888 from aconsuegra/ac/fix-acceptance-test-output
Fix expected error output of TestRepo/repo-rename-transfer-ownership
2025-06-17 16:26:16 +02:00
Antonio Consuegra
b0ab450a06 Fix expected error output of TestRepo/repo-rename-transfer-ownership 2025-04-28 14:30:36 +02:00
Antonio Consuegra
519926b7cf Fix expected error output of TestRepo/repo-set-default 2025-04-28 13:54:09 +02:00
William Martin
fb97b3efaa
Fix pr create when push.default tracking and no merge ref (#10863)
* Fix pr create when push.default tracking and no merge ref

* Update pkg/cmd/pr/shared/find_refs_resolution.go

---------

Co-authored-by: Tyler McGoffin <jtmcg@github.com>
2025-04-24 16:41:14 +00:00
William Martin
4e68a61a58 Fix pr create when branch name contains slashes
Intentionally have not fixed remote names containing slashes because we
want to get a fix out for the vast majority failure case.
2025-04-24 15:14:49 +02:00
William Martin
a9dbda6913 Rework ref usage when finding and creating PRs 2025-04-15 13:38:10 -06:00
William Martin
ebd147b43e Use verbose upstream setting 2025-04-15 13:38:10 -06:00
Kynan Ware
bdfec50186 fix(pr create): use REPO var in AT 2025-04-15 13:38:10 -06:00
Kynan Ware
6004fc2cd8 fix(pr create): use curly brace for vars in AT 2025-04-15 13:38:10 -06:00
Kynan Ware
0611d9d06d test(pr create): fix user:branch syntax AT
This test was setting `remote.pushDefault` which likely caused
the `user:branch` syntax to be ignored. Update the test to not set
this config value.
2025-04-15 13:38:10 -06:00
Kynan Ware
188e1388b3 test(pr create): add AT for no local repo 2025-04-15 13:38:10 -06:00
Kynan Ware
1ce3d99227 test(pr create): add logical spacing between operations
Co-authored-by: Andy Feller <andyfeller@github.com>
2025-04-15 13:38:10 -06:00
Kynan Ware
ba6e2ec3ed test(pr create): skip tests that create forks 2025-04-15 13:38:10 -06:00
Kynan Ware
a5fe37f91b test(pr create): add AT for remote:branch syntax 2025-04-15 13:38:10 -06:00
Kynan Ware
1848beb94b test(pr create): unset gh-resolved 2025-04-15 13:38:10 -06:00
Kynan Ware
cd67c2efcb test(pr create): AT assert head repo and head ref 2025-04-15 13:38:10 -06:00
Kynan Ware
a8d01c70cd feat: support @{push} revision syntax 2025-04-15 13:38:10 -06:00
William Martin
cf9ac4447a Acceptance test issue/pr create/edit with project 2025-03-31 17:06:51 +02:00
Andy Feller
c2ba5c0199 Curly bracket wrapping acceptance tests 2025-03-19 08:05:51 -04:00
Andy Feller
018b6d6d07 Initial pass fixing gh issue and gh pr comment
There is still a bit of work to get the gh pr comment tests in order, however this goes a way towards fixing the issue along with acceptance tests.

Also, it turns out some of the issue acceptance tests were really running `pr` tests.
2025-03-17 23:18:36 -04:00
Andy Feller
a18a9594be Fix acceptance test descriptions 2025-03-05 08:27:50 -05:00
Andy Feller
50780fc469 Fix gh secret disambiguity test
The previous commit failed to update the 2nd set of tests to rely upon GH_REPO instead of --repo flag.

These have been tested against `trunk` and fail because not being in a git directory when they should pass.
2025-03-04 14:31:12 -05:00
Andy Feller
0da037ca8f Expand gh secret acceptance tests
This commit builds on top of work previously done within acceptance tests around gh secret and remote disambiguation.

The choice of expanding this existing test rather than creating a new test was in order to keep context together within a single acceptance test rather than splitting it over multiple.
2025-03-04 14:16:00 -05:00
Tim Rogers
6c21ab2284
Error when gh repo rename is used with a new repo name that contains an owner
`gh repo rename` can only rename a repo, but not change its owner
(i.e. transfer it).

As flagged in #10034, at the moment, the CLI behaves like it can do
this, and produces weird results.

If I ask to rename my repo to `polyseam/frappe-containers`:

```bash
gh repo rename polyseam/frappe-containers
```

..the preview suggests that it will do the right thing:

```
? Rename polyseam/containers to polyseam/frappe-containers? Yes
```

...but the repo gets renamed wrongly:

```
✓ Renamed repository polyseam/polyseam-frappe-containers
```

This adds an upfront validation that looks for a slash and tells
you that the command can't transfer a repo.

Fixes #10034.
2025-02-03 11:49:21 +00:00
Tyler McGoffin
29e57ee8e7 Add tests for using the pr Finder outside of repo
This includes an acceptance test for `gh pr view` and a unit test on
`TestFind`
2025-01-31 14:22:02 -08:00
Tyler McGoffin
de9971d718
Merge pull request #9208 from Frederick888/find-pr-by-rev-parse-push
Find PRs using `@{push}`
2025-01-29 12:11:32 -08:00
William Martin
5630252f78 Add acceptance test for secrets remote disambiguation 2025-01-15 14:55:17 +01:00
Andy Feller
be250b3d33
Add renamed acceptance tests 2025-01-07 10:22:49 +11:00
Andy Feller
8bb2879b87
Reflect coverage for view and status subcommands 2025-01-07 10:22:48 +11:00
Andy Feller
eb16a75ab1
Expand with gh pr status 2025-01-07 10:22:46 +11:00
Andy Feller
2d1e4d625b
Add base gh pr view acceptance tests for changes
These are acceptance tests based on @williammartin work within various issues associated with #9208.

These need to be enhanced to account for `gh pr status`, however that should be quicker given these pass based on the updated branch and upstream fix for cross-repo same org changes.
2025-01-07 10:22:44 +11:00
Caleb Brose
7a1052ca33
Set LocalBranch even if the git config fails 2025-01-03 20:35:48 +00:00
William Martin
96ac8d6a2f Support pr view for intra-org forks 2024-12-13 14:27:41 +01:00
Heath Stewart
5da86e07e7
Merge changes from #10004
Merges changes from @williammartin including acceptance tests and word changes.

Co-authored-by: William Martin <williammartin@github.com>
2024-12-08 20:34:21 -08:00
William Martin
9bd8f09774 Use safepaths for run download 2024-12-04 22:12:58 +01:00
William Martin
694e565384 Fix PR checkout panic when base repo is not in remotes 2024-12-02 17:20:57 +01:00
William Martin
6a97dbfadf Add acceptance test for bare repo create 2024-11-11 15:51:52 +01:00
William Martin
a569d1030d Export empty results for cache list 2024-11-06 13:02:14 +01:00
Aarni Koskela
1c4c8e5145 Fix verbiage for deleting workflow runs
It's not deleting _workflows_ (which are specified in YAML)...
2024-11-04 17:55:35 +02:00
Andy Feller
37da12a9d2 Rename similar to other coarse commandset tests
Based on insights gained from reviewing conventions in #9815 with @jtmcg, I'm renaming this testscript to keep consistent with `gpg-key`, `label`, `ssh-key`, etc.
2024-10-28 12:54:50 +01:00
Andy Feller
911f070936 Skip extension testscript if bash isn't available
As this testscript creates a Bash-based script extension, the testscript should be skipped if it isn't on the path and executable.

Ideally, we would refactor this test to isolate that portion of the tests OR switch to a Go-based extension that can be compiled and run everywhere.
2024-10-28 12:54:50 +01:00
Andy Feller
ed24477fd3 Add comprehensive testscript for gh ext commandset
Rather than multiple separate testscripts per `gh ext` subcommand, this commit adds a comprehensive test around `gh extension` commandset.
2024-10-28 12:54:47 +01:00
Andy Feller
6dc86e5f40 Rename testscript for consistency
Similar to `gpg-key`, `label`, `ssh-key`, this coarse grained testscript should be named after the commandset given it isn't a collection of targeted scenarios.
2024-10-28 12:40:15 +01:00
Andy Feller
c27677bda6 Add comprehensive testscript for gh ruleset 2024-10-28 12:40:12 +01:00
Tyler McGoffin
7a5dc50324 Modify script to use the project number returned by the api upon creation 2024-10-25 09:03:50 -07:00
Tyler McGoffin
7148304344 Add acceptance test for project-create and project-delete 2024-10-24 12:53:52 -07:00
William Martin
2a2adfed0f
Merge pull request #9787 from cli/jtmcg/testscripts-auth
Add acceptance tests for `gh auth` commands
2024-10-24 18:42:31 +02:00
bagtoad
f72a82db99 Refactor gpg-key delete to align with ssh-key delete 2024-10-24 09:59:02 -06:00