Comments (9)
@cortadocodes I've assigned this to you, we'll come to it fairly soon I think, as the more I think about it, the more it's really going to make a difference to workflow.
from conventional-commits.
@cortadocodes if you're building a small equivalent of the conform tool, plus a pre-commit hook, perhaps we'll group them in this repo and rename the repo (egpre-commit-conventional-commit
), rather than having the tool in a separate repo, and the hook in this one.
Probably scratch that last, I didn't realise how small the checker would be.
from conventional-commits.
I've had a look at the conform
tool written in go
which gives some useful features for this:
- Enforces Conventional Commits
- Enforces header of given length in the imperative with an ending that isn't invalid (e.g. a full stop)
- Allows enforcing (or not) of the presence of a body
- Spell checks the commit message in the given language
- Allows a discrete set of custom commit codes (e.g. the ones I've already been using)
For me currently, it works if a pre-built release is downloaded and manually added as a hook in the .git
directory, but it doesn't seem to work properly with
go get
go build
- The provided GitHub action
- The provided
pre-commit
hook
So I think it may be better to write our own, but I'm wondering which of the features above are must haves and which are could haves @thclark?
from conventional-commits.
It seems to me like these are the must-haves:
- Enforces Conventional Commits
- Enforces header of given length
- Enforces header with an ending that isn't invalid
- Allows a discrete set of custom commit codes
from conventional-commits.
So I think it may be better to write our own,
Our own what? Conform tool? Or GHA and pre-commit hook to run the existing conform tool? The latter, yes - the former would very much raise an eyebrow at how far deep we're getting.
It seems to me like these are the must-haves:
- Enforces Conventional Commits
- Enforces header of given length
- Enforces header with an ending that isn't invalid
- Allows a discrete set of custom commit codes
I agree that skipping the spell checker is sensible. It's mildly annoying when there are typos, it's a crashing marshmallowman on your dev flow when the spell checker doesn't have your word or the thing you deliberately want to type.
It seems like you've intentionally missed the imperative tense constraint on the header (e.g: enforcing the form between "fixes the issue" (passive) "fix the issue" (imperative)). Why is that? Anything to add to the pros and cons below?
Pros:
- Automated releases will read strangely if the tenses are mixed
Cons: - it may cause too much friction as we adopt the tool (and have our developers adopt it)
- Similar logic might apply as for the spellchecker (too constraining when you really are wanting to type a specific message).
from conventional-commits.
I meant writing our own conform
tool, pre-commit package, and GHA. I've started doing it and it's turnint out to be quite simple - I'm nearly done!
Agree about spell checker - that's why I left it out.
With the imperative, I think all commits should be in the imperative but I'm aware that not everybody wants to do that. I also didn't know how to easily check if a sentence is in the imperative without NLP, although it looks like conform
just checks if the first word in the header after the commit code is in a list of known imperative verbs.
I do think it's part of good practice to make commits imperative, so I could/should probably easily add what conform
has.
from conventional-commits.
@cortadocodes if you're building a small equivalent of the conform tool, plus a pre-commit hook, perhaps we'll group them in this repo and rename the repo (eg pre-commit-conventional-commit
), rather than having the tool in a separate repo, and the hook in this one.
from conventional-commits.
This is now released in https://github.com/octue/octue-sdk-python/releases/tag/0.1.20
The only difference from the issue description is that we agreed to only check if the setup.py
version is semantically correct rather than actually updating it - this allows us complete control over the version number of the next release in case we need to override what git-mkver
says.
from conventional-commits.
This has now also been rolled out to amy
, twined
, and planex-site
.
from conventional-commits.
Related Issues (20)
- Add option to add link to relevant pull request in release notes
- Link release note items to commit diff
- Write article on the benefits of conventional-commit-based continuous deployment on Medium for the new website HOT 1
- Mkver comparison incorrect where package.json not in repository root HOT 3
- Missing commits from PR history
- Add style subheading to release notes
- Add whitespace to valid commit header endings
- Add commit codes for deprecation and subsequent removal HOT 3
- Add support for `DEPRECATION` notes in commits
- Implement a set of Github Actions
- Consider putting all breaking changes at top of their sections in release notes generator
- Consider using ❌ or similar emoji to denote breaking changes HOT 4
- Allow brackets at end of commit message
- BREAKING-CHANGES has a mismatched format HOT 1
- Add breaking change commit notes to release notes HOT 3
- I want a boom
- Remove line length limit for commit bodies or format it away so upgrade instructions render nicely in markdown
- Improve upgrade instructions format in release notes generator
- Consider merging some of the release notes sections
- TypeError on a PR with many commits HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conventional-commits.