Skip to content

Add support for fetching the Circle CI status of a remote branch #26

@v2nic

Description

@v2nic

Every remote branch that we know of should have a local state machine to keep the CircleCI state. It should be associated to the commit ID of that remote branch.

If it is unknown, then it should be in a queue to fetch the remote CircleCI state. If the state is "running", then we should have some background mechanism to fetch updates to figure out once it's completed if it passed or failed.

If the remote state is either passed or failed, then we mark that commit as passed or failed, and we stop re-fetching until we notice the remote branch commit ID changed. As a very low queue priority, if we know of a branch that has an open pull request, then we may periodically refetch the status of a CircleCI pipeline that failed.

The CircleCI status should be displayed as an icon, just like in the git repositories repo. It should appear whenever an entity is displayed that involves a remote branch. For instance, a work tree that is a checkout of a local branch that has a remote tracking branch should have the CircleCI icon. A pull request should always have a remote branch; therefore, it will always have that icon.

The icon should be gray when we don't know the remote status. It should be orange if it's currently running, yellow if it's running, red if the pipeline failed, and green if the pipeline passed. Dark gray if the pipeline is blocked on approval.

The CircleCI CLI is very limited.

Instead, use the API v2.

https://circleci.com/docs/api/v2/

v2nic Authored by v2nic on Feb 11, 2026

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions