Skip to content

Allow rwx results to infer run from current git branch#386

Draft
robinaugh wants to merge 1 commit intomainfrom
jason/results-implicit-run-lookup
Draft

Allow rwx results to infer run from current git branch#386
robinaugh wants to merge 1 commit intomainfrom
jason/results-implicit-run-lookup

Conversation

@robinaugh
Copy link
Contributor

@robinaugh robinaugh commented Feb 28, 2026

Blocked by https://github.com/rwx-cloud/cloud/pull/6961

Summary

  • When no run ID is provided to rwx results, the CLI now infers the run from the current git branch and repository name
  • Queries /mint/api/runs/latest with branch_name and repository_name query params
  • Extracts the repo name from the git origin URL (e.g. git@github.com:rwx-cloud/cli.gitcli)
  • Prints the run URL (when returned by the API) before status output
  • Handles "no run found" with a clear error message

Test plan

  • Run rwx results with no args in a git repo — should resolve latest run for current branch
  • Run rwx results with no args outside a git repo — should error asking for a run ID
  • Run rwx results <run-id> — existing behavior unchanged
  • Run rwx results --wait with no args — should poll until complete
  • Run rwx results --output json with no args — should return JSON without the info message
  • Verify rwx results with no matching run returns a clear error

@robinaugh robinaugh self-assigned this Feb 28, 2026
@robinaugh robinaugh force-pushed the jason/results-implicit-run-lookup branch 2 times, most recently from 75de9bd to 6c494a2 Compare February 28, 2026 19:31
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.
@robinaugh robinaugh force-pushed the jason/results-implicit-run-lookup branch from 6c494a2 to ec9e0c4 Compare February 28, 2026 19:36
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.

1 participant