Merged
Conversation
- 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.
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.
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.
These are the minimum fixes necessary to repair `gh pr create` tests after refactoring the underlying metadata resolution logic.
Thanks to @BagToad, this commit refactors the argument to `NewCopilotReplacer(bool)` from being where this is used to what it effect is has. Because there is already precedence for display name being `<login> (<name>)`, I worried there would be confusion for `Copilot (AI)` being display name for assignees and reviewers but `Copilot` when going to GitHub.com UI. Instead, I renamed the argument based on whether the login is returned / replaced.
Based on PR feedback from @BagToad, this commit creates a new constant for the Copilot bot name, which is used in the assignee / reviewer selection as well as replacing `@copilot` when going to GitHub.com UI
In refactoring how this parameter works, I forgot to update the related tests to match.
…ilot Assign Copilot during `gh issue create`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.3)
Can you help keep this open source service alive? 💖 Please sponsor : )