SwanseaUniversityMedical / concept-library

Concept Library
https://conceptlibrary.saildatabank.com
GNU General Public License v3.0
8 stars 2 forks source link

Must use Conventional Commit messages to trigger releases off master #1423

Closed JossWhittle closed 1 year ago

JossWhittle commented 1 year ago

We use Conventional Commit messages to trigger new versions. Here is the spec https://www.conventionalcommits.org/en/v1.0.0/

These commit messages are a blend between being human readable and meaningful, and being machine readable and information rich.

An example commit message might be:

feat: Added new foobar feature to the bazbiz module

This commit message indicates a new feature is being added. What type of release should this create?

These are the release rules that we use by default:

{"type": "major", "release": "major"},
{"type": "minor", "release": "minor"},
{"type": "patch", "release": "patch"},
{"type": "no-release", "release": false},

{"type": "docs", "release": false},
{"type": "test", "release": false},
{"type": "ci", "release": false},

{"type": "feat", "release": "minor"},

{"type": "chore", "release": "patch"},
{"type": "refactor", "release": "patch"},
{"type": "style", "release": "patch"},
{"type": "revert", "release": "patch"},
{"type": "perf", "release": "patch"},
{"type": "fix", "release": "patch"},
{"type": "build", "release": "patch"},

So you can see that our example feat: blah commit message is going to trigger a minor release. That is, 1.1.5 would be bumped to 1.2.0.

Use a relevant commit type (feat / fix / refactor / chore / ci) that indicates clearly what it is you are trying to change about the state of the master branch.


In order to generate new releases commits merged into the master branch must have Conventional Commit messages.

JossWhittle commented 1 year ago

@ZinnurovArtur, @elmessary, @JackScanlon, @ieuans, @alexcoldea, @ChrisGreenSU, @shahzadmumtaz22, @DSThayer, @mr-possible, @SAIL-Ieuan

JossWhittle commented 1 year ago

To clarify, we don't care what your commit messages on your branches look like. We just care that when you merge them into master your Squash them and provide a proper commit message that will end up on master.

JackScanlon commented 1 year ago

Thanks for taking a look Joss.