Cirrus-ci-docs: Cirrus not respecting [skip ci] commits when opening PR

Created on 4 Sep 2019  路  3Comments  路  Source: cirruslabs/cirrus-ci-docs

Expected behaviour

Commits with either [skip ci] or [ci skip] in the first line would be skipped by Cirrus CI when creating a PR.

Actual behaviour

Cirrus won't skip the first commit, but will skip any subsequent ones.

Details

See ponylang/ponyc#3301 where I did some testing. Cirrus only skipped commits the last two commits, but not the first one (its tasks were queued and later cancelled). Apparently this has nothing to do with using either [skip ci] or [ci skip].

EDIT: Changed title and description to describe the real cause.

UX enhancement

Most helpful comment

That makes sense. In that case a note about PRs could be added to the documentation instead.

All 3 comments

Oh. I see the issue. PR got open and then the $CIRRUS_COMMIT_MESSAGE became the PR title which didn't contain [skip ci]. Let me think what can be done in such corner case. 馃

Not sure if fixing it worth the effort. WebHook event from GitHub about newly opened PR doesn't contain full commit information for the HEAD commit of the PR. It contains just SHA and timestamp but not the actual message that's why Cirrus constructs $CIRRUS_COMMIT_MESSAGE as PR's title + PR's body message. So if title contains [skip ci] then it would've work.

Cirrus always creates a new build when a PR opens even if there was already a build for the same SHA. It's done because env for PRs are different (has $CIRRUS_PR) which frequently lead to different behaviour of CI scripts or even some tasks. So this behaviour aligns with how Cirrus is expected to behave.

That makes sense. In that case a note about PRs could be added to the documentation instead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iskakaushik picture iskakaushik  路  5Comments

MarcoFalke picture MarcoFalke  路  3Comments

fkorotkov picture fkorotkov  路  5Comments

cevich picture cevich  路  5Comments

januswel picture januswel  路  4Comments