26

2020-02-04-ci-skip-in-commit-title-bad

 4 years ago
source link: https://github.com/tamouse/swaac/blob/master/posts/2020/02/2020-02-04-ci-skip-in-commit-title-bad.md
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
title date categories tags

TIL: putting [ci skip] in the commit message title breaks merge builds

2020-02-04 13:04:05 -0600

git

git

CI

builds

merges

commit-messages

skip

A common way to keep a specific commit from triggering a build on continuous integration services, such as travis and circle (maybe others) is to use [ci skip] or [skip ci] in the commit message.

If the skip directive is put in the commit message's first line, which is treated as the commit message title , it can cause problems for merges down the line.

When the list of commits is included in a merge commit's message body, the skip directive shows up, which causes the merge build to be skipped as well.

bad commit message:

[ci skip] fix some typos

The directive will show up in the merge commit message body in the list of commits.

good commit message:

updated the README

- fixed some typos and broken links

[ci skip]

Only the title shows up in the merge commit message body, the skip directive does not.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK