Learning center

The squash commit on main has no CI run. Did [skip ci] in a branch commit cause it?

It can. GitHub's default squash message for a pull request with two or more commits lists their messages, so a [skip ci] written on one draft commit lands in the message of the commit on main, and GitHub then starts no push workflow for it. Search the squash commit's message for a skip instruction before you rely on a main run, and start the run by hand if one is missing.

How the instruction travels#

GitHub's documentation lists the strings that stop a run: [skip ci], [ci skip], [no ci], [skip actions], [actions skip], and a skip-checks: true trailer. Workflows "that would otherwise be triggered using on: push or on: pull_request won't be triggered" when one appears "in the commit message in a push, or the HEAD commit of a pull request". Skipping workflow runs

The squash message's default is "the commit title and message if the pull request contains only 1 commit, or the pull request title and list of commits if the pull request contains 2 or more commits". Configuring commit squashing The pull request's own runs were not skipped if its head commit had no instruction, so the page looked normal until the merge.

Reproduce it locally#

git merge --squash builds the same kind of list. The branch has one commit marked [skip ci] and one fix:

$ git log -1 --format=%B main
Squashed commit of the following:
[…]
    fix: parser accepts exponents
[…]
    docs: draft notes [skip ci]

$ skip check on the squash message
squash message carries a skip instruction
exit 1

The instruction was meant for one documentation commit. In the squash commit it applies to the parser fix as well.

A public case#

A public Android project merges translation pull requests by squash. Its Unit tests workflow runs on: push with no branch or path filter. Commit bab825755cb6, "Translations from Crowdin (#18962)", has a message whose bullets each end in [skip ci], 105 of them. Listing push runs for recent commits on its default branch:

[…]
f34bb808e4e0 skip=true push-runs=[] Translations from Crowdin (#18966)
[…]
cf393fbc74a4 skip=false push-runs=[Unit tests] Add logviewer
bab825755cb6 skip=true push-runs=[] Translations from Crowdin (#18962)
7c4ad4ba7eff skip=false push-runs=[Unit tests,Unit tests] Merge branch 'release' (with conflict resolution)

Here the skip is probably intended, since the change is translations. The record looks the same when the skipped commit carries a code fix.

What else leaves a commit without a run#

CauseHow to tell
Skip instruction in the messagegit log -1 --format=%B SHA contains one of the strings
Path or branch filterThe workflow's on.push lists paths, paths-ignore or branches
The commit was not the last in its pushA push run uses the "tip commit pushed to the ref" (events reference); earlier commits in that push have no run of their own
Pushed with the GITHUB_TOKENGitHub does not start a push run for it (GITHUB_TOKEN)
The workflow was disabledgh workflow list --all includes disabled workflows and shows their state

The skip documentation adds that checks for a skipped workflow "remain in a 'Pending' state", and a required check then blocks merging. On main nobody waits for that check, so the gap goes unnoticed. The skip applies only to push and pull_request; a merge_group or pull_request_target run still starts.

Keep the fix tested#

Find whether a run exists for the commit you ship:

gh api "repos/OWNER/REPO/actions/runs?head_sha=SHA&event=push" --jq '.total_count'

A zero means no push run. Start one with gh workflow run WORKFLOW --ref main if the workflow allows workflow_dispatch, and check that the run's head_sha is the commit you ship. Edit the squash message in the merge dialog to remove skip strings that belonged to one draft commit.

See a required check waiting for a status and the squash commit QA tested. Return to handing over evidence.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading