LinuxCommandLibrary

hub-ci-status

Show CI status for GitHub pull requests

TLDR

Check the CI status for this branch

$ hub ci-status [[-v|--verbose]]
copy

Display status of GitHub checks for a commit
$ hub ci-status [[-v|--verbose]] [commit_SHA]
copy

SYNOPSIS

hub ci-status [options]
hub ci-status [-v] [-R ]

PARAMETERS

-v
    Displays more detailed information about the CI statuses, including individual check names and their outcomes.

--verbose
    Long form of -v, displays more detailed information about the CI statuses, including individual check names and their outcomes.

-R
    Specifies the GitHub repository whose CI status should be checked, in the format owner/repository-name.

--repo
    Long form of -R, specifies the GitHub repository whose CI status should be checked, in the format owner/repository-name.

DESCRIPTION

hub ci-status is a subcommand of the hub tool, which extends git with GitHub-specific functionalities. This command fetches and displays the Continuous Integration (CI) status for the latest commit of the current Git repository's branch on GitHub. It provides a quick overview of whether the associated CI checks (e.g., GitHub Actions, Travis CI, CircleCI) passed, failed, or are pending. This is particularly useful for developers who want to quickly ascertain the health of a pull request or a branch without leaving their terminal. The command interacts directly with the GitHub API to retrieve this information, making it an efficient way to monitor your project's build and test results. It helps in maintaining a smooth development workflow by providing immediate feedback on code changes.

CAVEATS

Requires the hub tool to be installed and configured with appropriate GitHub authentication credentials (e.g., HUB_GITHUB_TOKEN environment variable or hub's stored credentials).
The command relies on the GitHub API to fetch CI status. Rate limits or network issues might affect its performance.
It only displays CI status for checks configured and reported to GitHub for the specified repository and commit.
For newer GitHub features, the gh (GitHub CLI) command might offer more comprehensive or integrated functionality.

CONTEXT AWARENESS

The command intelligently detects the GitHub repository based on the current Git working directory if no --repo option is provided.

INTEGRATION WITH GITHUB

It leverages GitHub's commit status API to retrieve the aggregated status of all continuous integration checks associated with a specific commit.

HISTORY

The hub ci-status command emerged as part of the hub project, which began development around 2009. hub was created to bridge the gap between git and GitHub, enabling users to perform common GitHub operations directly from the command line. ci-status was added to provide quick access to continuous integration feedback, reflecting the growing importance of automated testing and deployment workflows in software development. It served as an early command-line interface for monitoring GitHub's built-in and integrated CI services before the advent of the official gh CLI.

SEE ALSO

hub(1), git(1), gh(1)

Copied to clipboard