Allow rwx results to infer run from current git branch#386
Draft
Allow rwx results to infer run from current git branch#386
Conversation
75de9bd to
6c494a2
Compare
When no run ID positional argument is provided, the CLI now reads the current branch and repository name from git and queries the /mint/api/runs/latest endpoint with branch_name and repository_name query params. The resolved run ID is then used for the prompt lookup. Also prints the run URL (when returned by the API) before the status output, and handles the case where no matching run is found.
6c494a2 to
ec9e0c4
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Blocked by https://github.com/rwx-cloud/cloud/pull/6961
Summary
rwx results, the CLI now infers the run from the current git branch and repository name/mint/api/runs/latestwithbranch_nameandrepository_namequery paramsgit@github.com:rwx-cloud/cli.git→cli)Test plan
rwx resultswith no args in a git repo — should resolve latest run for current branchrwx resultswith no args outside a git repo — should error asking for a run IDrwx results <run-id>— existing behavior unchangedrwx results --waitwith no args — should poll until completerwx results --output jsonwith no args — should return JSON without the info messagerwx resultswith no matching run returns a clear error