Ignore only commits using [skip ci] in PR, not the whole PR
closed
This post was marked as
closed
S
Stefano Baghino
What happened to us:
- we sometimes use [skip ci]to avoid triggering a full build on trivial commits (e.g. typos)
- we squash-merge on GitHub: by default, the overall commit message strings together the commit messages that went into the PR, including those with the [skip ci]tag
- depending on the length of the PR description and when we used [skip ci]over the course of commits that contributed to it, the[skip ci]tag might make it into the first 250 characters of the commit message
- based on the previous point, the CI run on mainfollowing the merge might end up being skipped, which we don't want to happen
A couple of ideas on how to address this:
- I think skipping a CI run after a merge on mainis probably not particularly desirable: if you agree with this, you might think about ignoring any[skip ci]or[ci skip]onmain, with the possibility of opting in into this behavior
- instead of (or as a further limit to) inspecting the first 250 characters of the commit, you might want to look for the [skip ci]/[ci skip]string to the commit message title (i.e. the first line)
Note that the two solutions above are not mutually exclusive.
T
Tony Michaels
I had a similar need. We have a build that does a commit (to store version update in package.json) during the circleci build - but we add the "[skip ci]" to that commit so it doesn't trigger a loop based on a "commit" build.
but tried the new "approval" action so that we can have a job to start a manual build (e.g. by approving it will start a build). however since the last commit has a [skip ci] tag on it - the approved build will get skipped.
maybe missing anyother way around this...but found this report since i was trying find a "force build" that would ignore the "[skip ci]".