Commit graph

4949 commits

Author SHA1 Message Date
Andy Feller
e2bed653df Implement actor and user assignee tests 2025-07-16 14:10:26 -04:00
Andy Feller
21202ff992 Improve comments from PR feedback 2025-07-16 08:47:12 -04:00
Andy Feller
fd1c31de59 Fix gh pr create tests from metadata change
These are the minimum fixes necessary to repair `gh pr create` tests after refactoring the underlying metadata resolution logic.
2025-07-11 15:32:17 -04:00
Andy Feller
554fe0f51f Fix gh issue create tests, copilot web assign
This commit is primarily focused on fixing the existing `gh issue create` tests with the changes to the underlying queries retrieving the data for resolving metadata.

Additionally, a new test case for `gh issue create --web --assignee @copilot` was added to mirror existing tests.  While exercising this capability, I found out the web UI apparently wants `copilot` instead of the `copilot-swe-agent` login, so changes to address that were a part of this commit.
2025-07-11 12:19:36 -04:00
Andy Feller
a8053d19a9 Resolve issue and PR metadata consistently
This commit refactors how `gh issue create` and `gh pr create` retrieve information needed to resolve metadata to be more in line with the approach used in `gh issue edit` and `gh pr edit`.

Previously, both commands used `prshared.fillMetadata(...)` function to retrieve assignees, reviewers, labels, and teams outside of `api.RepoMetadata(..)`.  Now, these commands will consistently use the same logic and data for resolving metadata.
2025-07-11 10:21:17 -04:00
Andy Feller
49821b20f9 Add non-TTY issue create copilot test, todos 2025-07-08 15:19:09 -04:00
Andy Feller
c69f828019 Initial assign Copilot during issue create changes
- updated command documentation for new `--assignee @copilot` syntax
- updated `gh issue create` logic with feature detection for actor availability
- fixed bug where `--assignee` would not select default assignees due to login vs display name mismatch
- updated survey prompt logic to avoid parsing prompt options in favor of correlating with assignee / actor source

One thing that is not included in these changes is incorporating the GraphQL mutation to replace assignees with actors, which I will continue iterating on.
2025-07-02 16:22:12 -04:00
Daniel Krzeminski
b31f38c946
Fix: gh pr create prioritize --title and --body over --fill when --web is present (#10547)
* fix: prioritize title and body over autofill for prs

* fix: prioritize title and body over autofill tests

* refactor: collapse state conditions

---------

Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-06-24 12:54:43 +00:00
Eugene
98d7135ccc
Merge branch 'trunk' into eugene/release-verify 2025-06-20 06:50:04 -07:00
ejahnGithub
169b909015 improve the description for gh release verify cmd 2025-06-19 10:18:23 -04:00
jinjingroad
28d5de9d8e chore: fix function name
Signed-off-by: jinjingroad <jinjingroad@sina.com>
2025-06-19 12:36:52 +08:00
Eugene
898bb42719
Merge branch 'trunk' into eugene/release-verify 2025-06-17 07:54:26 -07:00
William Martin
49ed6c4681 Use t.Chdir in tests 2025-06-17 11:44:14 +02:00
William Martin
da9ed6a336 Quote filenames suggested at the end of worklow run 2025-06-16 18:02:47 +02:00
Eugene
8d0161fa5d
Merge branch 'trunk' into eugene/release-verify 2025-06-16 08:49:58 -07:00
Dylan Ancel
1eee56ec00
Add accurate context when run rerun fails (#10774)
* Add accurate context when run rerun fails

* Update tests to verify behaviour for API errors

Signed-off-by: Babak K. Shandiz <babakks@github.com>

* Use the new `httpmock.JSONErrorResponse` helper

Signed-off-by: Babak K. Shandiz <babakks@github.com>

---------

Signed-off-by: Babak K. Shandiz <babakks@github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-06-11 15:28:03 +01:00
William Martin
8baf5cc3e4
Merge pull request #11065 from cli/andyfeller/gh-pr-edit-assignees
Fix assignees being dropped from `gh pr edit`
2025-06-11 15:44:42 +02:00
Babak K. Shandiz
bde303dab2
test: fix test data const
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-06-10 13:57:31 +01:00
Brian DeHamer
53cae592f6
refactor to simplify implementation
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-06-05 10:35:21 -07:00
Kynan Ware
ed4b90104f test(pr): Add tests for actor assignees 2025-06-03 14:30:19 +01:00
Andy Feller
a24d39ac87 Fix test, remove partial standalone test 2025-06-03 13:48:01 +01:00
Andy Feller
cde860be88 Iterate on pr edit problems with existing assignees
This commit is a handful of changes around `gh pr edit --add-assignee` behavior.  Most notably, fixing a bug where the assigned actors weren't being dropped.

In addition to this, I was refactoring the testing setup to allow for individual test table scenarios could be contained.
2025-06-03 13:33:52 +01:00
William Martin
c13f2f1232
Merge pull request #11057 from cli/wm/fix-pr-edit
Fix pr edit when URL is provided
2025-06-02 17:44:30 +02:00
Tim Rogers
9a8031151c
Document support for @copilot in gh [pr|issue] edit --add-assignee and --remove-assignee (#11056)
* Document support for `@copilot` in `gh [pr|issue] edit --add-assignee` and `--remove-assignee`

Following up on #10991, this updates the help text for
`issue edit` and `pr edit`'s `--add-assignee` and
`--remove-assignee` options to mention that you can use
`@copilot`.

This is already mentioned in the command-level help text, but
not at the argument level, whereas the `@me` macro is.

* Apply suggestion from @babakks

Co-authored-by: Babak K. Shandiz <babakks@github.com>

* Apply suggestion from @babakks

Co-authored-by: Babak K. Shandiz <babakks@github.com>

---------

Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-06-02 16:29:35 +01:00
William Martin
793a7ff459 Fix pr edit when URL is provided 2025-06-02 15:07:55 +02:00
ejahnGithub
d7d9228609 use standardize color roles logic for the logging 2025-05-30 14:08:59 -07:00
ejahnGithub
5048d586dc moved to shared lib 2025-05-30 13:46:54 -07:00
ejahnGithub
bf4b793eff moved to shared lib 2025-05-30 13:43:07 -07:00
ejahnGithub
56f8877097 update the artifact and bundle for testing 2025-05-30 13:31:23 -07:00
ejahnGithub
df87b15598 clean the code 2025-05-30 12:53:19 -07:00
ejahnGithub
96db923f19 revert the workflow 2025-05-30 12:33:40 -07:00
ejahnGithub
4b1108734c debug windows env 2025-05-30 12:18:23 -07:00
ejahnGithub
b423edff7b debug windows env 2025-05-30 11:51:33 -07:00
ejahnGithub
53cb90aeca debug windows env 2025-05-30 11:16:04 -07:00
ejahnGithub
2312cfb146 clean the path 2025-05-30 10:07:18 -07:00
ejahnGithub
6d90ad6a2d clean the path 2025-05-30 09:58:23 -07:00
ejahnGithub
e00e1c414b clean the path 2025-05-30 09:46:46 -07:00
ejahnGithub
8e6ed6eb38 improve test 2025-05-30 09:30:05 -07:00
ejahnGithub
3b17318ee4 fix test 2025-05-30 08:31:07 -07:00
Eugene
15b7692f1a
Merge branch 'trunk' into eugene/release-verify 2025-05-30 08:20:42 -07:00
ejahnGithub
71c2361dfc add unit test 2025-05-30 08:17:21 -07:00
Andy Feller
79fc854814
Merge pull request #11030 from cli/bdehamer/release-asset-digest
Add Digest to ReleaseAsset struct
2025-05-29 15:11:16 -04:00
Brian DeHamer
fc6ac59bbc
fixup release asset digest tests
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-05-29 12:00:40 -07:00
Brian DeHamer
0d6b9f89a4
remove nolint comment for release header
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-05-29 11:54:44 -07:00
Brian DeHamer
7b33da981e
Update pkg/cmd/release/view/view.go
Co-authored-by: Andy Feller <andyfeller@github.com>
2025-05-29 11:53:33 -07:00
Meredith Lancaster
23382f498e Merge branch 'trunk' into gh-attestation-tuf-client-retry 2025-05-28 10:24:32 -06:00
Babak K. Shandiz
d1b82d19f9
Merge pull request #10980 from cli/babakks/improve-pr-create-docs
Mention `pr create` will print the created PR's URL
2025-05-28 16:43:04 +01:00
phanium
19e1178a32
fix: gh gist edit panic when no file in a gist (#10627)
* fix: `gh gist edit` panic when no file in a gist

* fix: improve error message

Signed-off-by: Babak K. Shandiz <babakks@github.com>

---------

Signed-off-by: Babak K. Shandiz <babakks@github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-05-28 14:40:14 +01:00
Babak K. Shandiz
c927ea40c3
Merge pull request #10979 from cli/babakks/improve-pr-list-docs
Add example usage of `--head` option to `pr list` docs
2025-05-28 14:38:17 +01:00
Babak K. Shandiz
01a1859d40
Merge pull request #11013 from cli/babakks/add-run-presentation-tests
Add tests for `RenderJobs` and `RenderJobsCompact`
2025-05-28 13:10:44 +01:00