Skip to content

Add si status set and view for commit statuses - #7

Merged
setoelkahfi merged 1 commit into
cli/repo-clone-git-authfrom
cli/commit-statuses
Oct 28, 2026
Merged

setoelkahfi merged 1 commit into
cli/repo-clone-git-authfrom
cli/commit-statuses

Conversation

@setoelkahfi

@setoelkahfi setoelkahfi commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

si status set <SHA|REF> --state pending|success|failure|error reports a check on a commit, with optional --context, --description, --url and --repo. si status view [SHA|REF] shows the combined state and each check. A ref resolves through git2 inside a clone, and view defaults to HEAD. A full SHA the local clone doesn't have is passed through.

The client crate gets create_status and combined_status plus the CommitStatus and CombinedStatus types. Request tests check the path, method and body.

Only the repository owner can post a status, so other users get the server's 404.

Checked with cargo fmt --check, cargo clippy -D warnings, cargo test --workspace and cargo check -p sigit-si-api --no-default-features.

si status set reports pending, success, failure or error for a check on
a commit, so CI can fill the checks tab. si status view shows the
combined state and each check. Both take a SHA or any ref in the current
clone, and view defaults to HEAD.

The client crate gets create_status and combined_status, with the
CommitStatus and CombinedStatus wire types.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@setoelkahfi
setoelkahfi added this pull request to stack #12 October 28, 2026 09:16
@setoelkahfi setoelkahfi self-assigned this Oct 28, 2026
@setoelkahfi
setoelkahfi requested a review from paydii October 28, 2026 09:16
@setoelkahfi
setoelkahfi marked this pull request as ready for review October 28, 2026 10:56

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This change adds support for setting and viewing commit statuses (checks) in the CLI, with new subcommands under si status. The implementation includes argument parsing, SHA/ref resolution (with fallback for unknown SHAs), API client methods for posting and fetching statuses, and UI rendering for combined status output. Tests cover SHA resolution and API request construction. No previous findings are present, and the new code integrates cleanly with the CLI and API client structure.


Automated review by siGit Code Review · commit 0cf6221 · see the review dashboard

@setoelkahfi
setoelkahfi merged commit 601450a into development Oct 28, 2026
1 check passed
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