I have a Pull Request for my project, in which last commit was minor (bumped package version) and I didn’t want to trigger Circle CI build for it so I have added [ci skip] in the commit.
However, when I had opened the PR, it seems that Github is waiting for Circle CI to validate the latest commit so I am not able to merge my Pull Request altogether.
At least for me, this seems slightly surprising behavior. Is there a way to avoid this in the future, or another workaround?
You can tell GitHub not to require checks in your repo’s Settings page.
Unfortunately PR checks are required by our “Code Pipeline” internal standards. We have to be sure that only “valid, properly unit tested code” can be merged into “master” branch, hence PR should be validated before making it available for merge.
Hmm that is tricky. I’m not sure what to do then if this situation comes up frequently. For this one off PR, you can rebase the commit(s), which will count as a new commit and be tested as long as you don’t use [skip ci] again.
I can’t think of a way around skipping the build and having GitHub be okay with that.
This makes sense. As a workaround we decided instead of bumping package.json version and committing it with [ci skip] use ‘CIRCLE_BUILD_NUM’ environment variable which auto-increments and is unique every time. This way we don’t need to commit “bump” versions altogether.
Great! I’m glad you found a solution.