Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: fail fast if --context-repo does not have a matching name #4919

Conversation

olafurpg
Copy link
Member

Fixes CODY-2947

Previously, the CLI would silently continue even if --context-repo had a spelling or referenced a repo that doesn't exist on the instance. Now, the CLI fails fast with a helpful error message.

Test plan

Manually tested.

❯ pnpm agent chat --context-repo sourcegraph/cody --context-repo github.com/sourcegraph/jetbrains -m 'what is the agent'
...
 ✖ The repository sourcegraph/cody does not exist on the instance. The name needs to match exactly the name of the repo as it appears on your Sourcegraph instance. Please check the spelling and try again.

Fixes CODY-2947

Previously, the CLI would silently continue even if `--context-repo`
had a spelling or referenced a repo that doesn't exist on the instance.
Now, the CLI fails fast with a helpful error message.
@olafurpg olafurpg requested a review from a team July 18, 2024 09:18
@olafurpg olafurpg enabled auto-merge (squash) July 18, 2024 09:22
@olafurpg olafurpg disabled auto-merge July 18, 2024 09:22
@olafurpg
Copy link
Member Author

Restarted Windows job due to a flaky failure in symf.test.ts

@olafurpg olafurpg enabled auto-merge (squash) July 18, 2024 12:37
Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@olafurpg olafurpg merged commit 0731d28 into main Jul 18, 2024
19 checks passed
@olafurpg olafurpg deleted the olafurpg-cody-2947-fail-fast-if-context-repo-does-not-have-an-exact-match branch July 18, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants