CircleCI not triggered: [skip ci] in squash
We merged to main and CircleCI did nothing. The squash commit body held the text [skip ci], copied from the pull request description.
Contents
We merged a pull request to main and production did not change. No pipeline existed for the merge commit at all. This post shows how we found the cause in one command, how we started the missing pipeline, and the rule we now follow when writing PR text.
The symptom
The pull request moved our CI from GitHub Actions to CircleCI. After the squash merge we expected a deploy. The live site still served the build from before. In the CircleCI project there was no new pipeline: the numbers went from 3 and stopped.
A red pipeline would have been easier. No pipeline means nothing ran, so there is no log to read. The question becomes why CircleCI was never asked, or why it said no.
Check the commit message
CircleCI skips a push when the head commit message contains [skip ci] or [ci skip]. GitHub squash merges build the commit message from the pull request title and description. So anything in the description ends up in the commit body.
We read the message through the API:
gh api repos/<owner>/<repo>/commits/main -q .commit.message \
| grep -n -iE "skip ci|ci skip"
It returned one hit:
7:[skip ci] instead of relying on paths-ignore...
The description of that PR explained our convention: commits written by machines, like a daily data ledger, carry [skip ci] so they never deploy. We had written that sentence in the PR text, with the marker in brackets, and the squash copied it into the message. CircleCI matched the text and skipped the pipeline. It does not know the text was an explanation, not an instruction.
Start the pipeline by hand
We did not want to push an empty commit just to retry. CircleCI lets you start a pipeline for a branch through its API:
circleci api -X POST api/v2/project/gh/<org>/<repo>/pipeline \
-d '{"branch":"main","parameters":{"run":"push"}}'
Our config uses a pipeline parameter named run to pick which workflow starts, so we passed push. Yours may not need parameters. The pipeline number jumped from 3 to 4 only after this call, which confirmed that nothing had been created before it.
The deploy ran and production updated.
Proof it was the marker
A cause is only a guess until a change removes it. The next merge was a normal one, with no marker anywhere in its message. It deployed by itself with no help. That is the evidence: same repo, same config, same settings, and the only difference was the text in the message.
The rule we follow now
- When you write a PR description for a squash merge, treat it as part of a commit message. Do not write
[skip ci]or[ci skip]in it, even to talk about the feature. - If you must refer to it, spell it differently, for example "skip-ci marker", or put it in a code block that you remove before merging. Check the message GitHub offers in the squash box, which you can edit.
- The same applies to titles. Other services read different markers too, so check the docs of yours.
A quick check before merging is to look at the final message text in the merge dialog and search it for skip.
If your pipeline never appears
- Run the
gh apicommand above on the merge commit and search for the skip markers. - Check that the branch matches your filters, and that the config file is valid with
circleci config validate. - Check that the project is still followed and the webhook is active.
- Start a run by hand through the API to see whether the config itself works.
In our case step 1 was enough. The whole investigation took a few minutes once we looked at the commit message instead of the CI settings, and that is the point we would pass on: when nothing runs, read what the trigger read.