/p10k-ci-status

Shows the status of GitHub Actions for the current branch

Primary LanguageShell

GitHub CI status for Powerlevel10k

A segment for Powerlevel10k that indicates the GitHub's CI status for the current branch.

Installation

This depends on hub to perform status checks, and zsh-async to do this asynchronously. These dependencies need to be installed manually.

Once the dependencies are installed, load p10k-ci-status.plugin.zsh after Powerlevel10k is loaded in your ~/.zshrc or similar, for example with zgen:

zgen load davidparsson/p10k-ci-status

Finally add the ci_status segment to your list of segments in ~/.p10k.zsh. In the examples below it is added last to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS.

What it does

It provides a symbol for the status of the current branch, below seen as the green checkmark or red cross:

A prompt with a green checkmark A prompt with a red cross

The available statuses are:

  • SUCCESS: A green checkmark
  • BUILDING: A yellow bullet
  • FAILURE: A red cross
  • CANCELLED: A yellow cross
  • ACTION_REQUIRED: A red triangle
  • NEUTRAL: A cyan checkmark

If there is no status for the local branch head, the upstream/remote branch head is used. In that case the same symbol is used, but the color is grey. The upstream statuses are:

  • UPSTREAM_SUCCESS
  • UPSTREAM_BUILDING
  • UPSTREAM_FAILURE
  • UPSTREAM_CANCELLED
  • UPSTREAM_ACTION_REQUIRED
  • UPSTREAM_NEUTRAL