Skip to content

Commit

Permalink
ci: chore commit type will no longer trigger a new release
Browse files Browse the repository at this point in the history
Add documentation on commit messages.
  • Loading branch information
yld-weng committed Jan 20, 2022
1 parent 11e46c8 commit a1a2e5a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
28 changes: 26 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -18,7 +18,31 @@ If you have found an issue or bug, or have any feedback regarding the website, p

## <a name="commit"></a> Commit Message Guidelines

To help us keep a consistent and readable commit messages, we use the specification published on [Convention Commits](https://www.conventionalcommits.org/en).
To help us keep a consistent and readable commit messages, we use the specification published on [Convention Commits](https://www.conventionalcommits.org/en). In short, the commit message should be in the format of `<type>([optional scope]): <description>`, where the `type` is one of the following structure elements:

- `feat` - New features
- `fix` - Bug fixes
- `perf` - Performance improvement
- `docs` - Documentation changes (including blog posts, learning paths, and visualisations)
- the scope `new-*` will trigger a minor release
- any other scopes will trigger a patch release
- `refactor` - Code refactoring
- `style` - Changes that only affecting styles
- `test` - Add, remove, and refactor tests
- `build` - Changes that affecting the building stage and dependencies
- `ci` - Continuous Integration related files and scripts
- `chore` - Changes that does not go into the production environment

Although the scope is optional but it is recommended to include the scope so that the commit message will be more clear to other contributors. The CI pipeline will pick up and analyse new commits made to the `master branch` and automatically make new releases based on the type (and scope) of these commits. The version update strategy for each type can be found in the file [semantic-release-rules.js](https://github.com/researchdata-sheffield/dataviz-hub2/blob/master/semantic-release-rules.js).

**Examples**

- `docs(new-visualisation): add a new visualisation on global poverty`
- CLI - `git commit -m "docs(new-visualisation): add a new visualisation on global poverty"`
- `build (framework): update xxx to v3.0.0`
- CLI - `git commit -m "build (framework): update xxx to v3.0.0" -m 'BREAKING CHANGES: migrate from v2 to v3'`
- `fix(no-release): responsive issue for xxx`
- the `no-release` scope will not trigger a release

## <a name="website"></a> Contribute to the core website

Expand Down Expand Up @@ -57,7 +81,7 @@ Once you have completed the installation steps, run `gatsby develop`. Now you ca

Before submitting your code, serve the production build to check if the website is running fine. Note that `npx lint-staged && npm run test:ci` will be run when you commit new codes to the repository. This means commits that failed the test will not be allowed.

Whenever you want to submit new codes, create a new pull request and merge (or squash merge) them into the `development` branch. **DO NOT** attempt to merge new code into the `master` branch directly.
Whenever you want to submit new codes, create a new pull request and merge them into the `development` branch. **DO NOT** attempt to merge new code into the `master` branch directly.

### Testing

Expand Down
18 changes: 10 additions & 8 deletions README.md
Expand Up @@ -2,23 +2,25 @@

<div align="center">
<i>Data visualisation community website for The University of Sheffield, exists to provide tools, training and build a community around interactive data visualisation at TUoS.</i>
<br><br><br>

<br><br>
<p>
<a href="https://shef-dataviz.slack.com" target="_blank" rel="noopener noreferrer">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/Slack_Technologies_Logo.svg/1280px-Slack_Technologies_Logo.svg.png" width="20%" />
<img src="https://upload.wikimedia.org/wikipedia/commons/d/d5/Slack_icon_2019.svg" width="5%" />
</a>
<span width="10%">&nbsp; &nbsp;</span>
<a href="https://groups.google.com/a/sheffield.ac.uk/forum/?hl=en#!forum/shef_dataviz-group" target="_blank" rel="noopener noreferrer">
<img src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" width="5%" />
</a>
<span width="10%">&nbsp; &nbsp;</span>
<a href="mailto:rdm@sheffield.ac.uk" target="_blank" rel="noopener noreferrer">
<img src="https://upload.wikimedia.org/wikipedia/commons/7/75/Antu-mail-folder-sent-16.svg" width="5%" />
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/High-contrast-mail-mark-unread.svg/48px-High-contrast-mail-mark-unread.svg.png" width="5%" />
</a>
<span width="10%">&nbsp; &nbsp;</span>
<a href="https://dataviz.shef.ac.uk/rss.xml" target="_blank" rel="noopener noreferrer">
<img src="https://upload.wikimedia.org/wikipedia/commons/c/cf/Font_Awesome_5_solid_rss-square.svg" width="5%" />
</a>
</p>
</div>
<br>

<p align="center">
<a href="https://dataviz.shef.ac.uk"><strong>dataviz.shef.ac.uk</strong></a>
Expand Down Expand Up @@ -60,11 +62,11 @@
![Fig1](./src/images/readme/readme.png)

<p align="center">
<a href="https://dataviz.shef.ac.uk/#learning-path">Learning path</a>
<a href="https://dataviz.shef.ac.uk/#learning-path">📚 Learning path</a>
·
<a href="https://dataviz.shef.ac.uk/events">Events</a>
<a href="https://dataviz.shef.ac.uk/visualisation">✨ Visualisation</a>
·
<a href="https://dataviz.shef.ac.uk/rss.xml">RSS feed</a>
<a href="https://dataviz.shef.ac.uk/events">📅 Event</a>
<br>
</p>

Expand Down
4 changes: 2 additions & 2 deletions semantic-release-rules.js
Expand Up @@ -10,8 +10,8 @@ module.exports = [
{ type: "test", release: "patch" },
{ type: "build", release: "patch" },
{ type: "ci", release: "patch" },
{ type: "chore", release: "patch" },
{ breaking: true, release: "major" },
{ revert: true, release: "patch" },
{ type: "chore", release: false },
{ scope: "no-release", release: false }
]
];

0 comments on commit a1a2e5a

Please sign in to comment.