Hello. It appears that Netlify is ignoring the [skip ci] flag in the commits in my PRs. You can see it here:
As you can see, [skip ci] is present in both the first and last commit, yet it still creates a deploy preview.
I’ve read a few replies in different posts with some conflicting info that has me a little confused:
This reply states that it should be the last one in the commit list
Whereas this reply states the opposite - that it should be the first one in the list
Clearly neither works for my PR linked above, since it’s present in all commits (first and last) yet the deploy preview still builds.
Any clarification here?
Btw, this particular PR from all-contributors is automatic and not created by me, and I have very little control around it. There’s no way for me to edit the title of the PR (other than asking them to add that into the bot functionality).
Sorry for the delay! I just want to clarify something. Based off of "So I guess I must have [skip ci] in the PR title for this to work and commits seem to be irrelevant." can you let me know if you are still experiencing obstacles? Or is keeping [skip ci] in the PR title working for you and you no longer need our assistance? Let us know!
Sorry I was not clear. I was just hoping for some clarification on why my experience is drastically different than what should be happening, per the instructions provided in the Netlify docs and what @hrishikesh is saying should work.
Firstly, the docs don’t mention PR titles at all. They say to put it in the commit messages. So I had no idea I could even do that. Do the docs need to be updated?
Secondly, I ran some more tests with a fresh repo, just to be extra sure:
I just had a thought/realization - does adding [skip ci] to the commit message only work when pushing commits directly to the production branch (aka pushing directly to main, not in a pull request)?
If so, that’s probably the cause of my confusion here.
I’m talking about pull requests/deploy previews in my issue report. I was under the (mistaken?) assumption it would also work in pull requests to add it into the commit message to block deploy previews, but seems like pull requests require it to be in the PR title instead.
Could you confirm if that is correct?
Am hoping this clarification could help others who might be caught by this also.
I did not use [skip ci] anywhere in the commit message, but only in the PR title and it still works.
So yes, it appears we’re checking the PR title and not the commit message, but it didn’t occur to us before as we always used the auto-generated title before.
I’ll file an issue to make this more explicit in the docs. Thanks for flagging this.