Netlify appears to be ignoring [skip ci] and generating the deploy preview anyway

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).

That’s only true when pushing multiple commits together. If you push one by one, the first one should have [skip ci].

I tested this just now and it seems to work fine.

Are you able to test this on a new site?

It seems to work in my repo if I add [skip ci] in the PR title. Here are identical PRs:

Only difference is the second one has [skip ci] in the PR title, which then successfully blocks deploy previews from being built.

So I guess I must have [skip ci] in the PR title for this to work and commits seem to be irrelevant.

Hey there,

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:

Is there something wrong with my account and/or setup to cause this discrepancy? The repo I just linked for testing is a brand new repo created today.

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.

Hey @melanieseltzer,

When I used [skip ci] as my commit message and created a PR on GitHub, GitHub automatically set the title as the commit message:

Now, when I explicitly removed [skip ci] from the auto-generated title:

that’s when I was able to reproduce this.

In this PR:

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.


Ah that does explain it. Thanks @hrishikesh for investigating!

I’m following up to note that we’ve updated the related documentation based on your experience. Thanks for reporting your concerns.

1 Like