Comments (1)
Add extra options to check commit message style and also to fix incorrect messages.
Thank you for your input! I can understand why you would want something like this. I have faced and solved similar problems like this for teams. Luckily, It is a solved problem.
I would like to add an action to CI to check that all commits since last version are in correct style, so I can check that MR won't break versioning.
If you are using angular, I highly recommend looking into the GitHub App Conventional Commits as one way to enforce commit standards. My personal recommendation is to use commitizen (there is a JS and Python variant, but I am talking about commitizen.py
here). Not only does it provide an interactive cli for making messages (add it as a commit hook) but it can be called with the check
option and it will validate a range of commits. I personally use the check options for checking any PRs from the CI to prevent invalid messages from getting into the repo. I also use it as a git commit-msg hook to enforce upon commit.
If you are using another parser type or a custom one, please let me know. I'm not sure if there are already built validators out there.
Also, I would like to be able to fix incorrect commits locally, probably by using rebase+reword functionality.
This is a very complicated problem within git as it must rebuild streams of commits. I have scripted something like this before and it is non-trivial. for that reason, I think is outside of the scope of Semantic Release.
Generally, PSR focuses on interpreting versions based on standards and creating releases. This type of requirement would be a pivot towards enforcing or fixing standards.
I recommend putting in safeguards via CI verification on PRs for commit linting, and also at the local git hook level. This prevents poorly styled commits into the repo. The one hole is the Web IDE, and direct pushes to main (trunk based dev) but those are organizational management items. These components should solve most of the issue in my opinion as it has for my teams. Let me know what you think.
One other component you could consider is using the following command to provide a bit of a check on version determination. This command will throw a non-zero exit code if a version is not going to be released.
semantic-release version --print --strict
Ultimately, I think other tools handle solving this problem already and seems kinda duplicative to add this additional functionality. I say this because our two tools already complement each other as we implement the same conventional commit standard.
from python-semantic-release.
Related Issues (20)
- All pre-release changelog on release. HOT 6
- GitHub Actions can't create release: `ValueError: release id for tag <tag> not found, and could not be created` HOT 4
- BREAKING CHANGE does not appear to cause major version bump HOT 4
- How to pre-release in all other branch. HOT 2
- Add emojis in release and changelog HOT 3
- Github release creation fails with "Error: Unauthorized" despite GH_TOKEN HOT 6
- v10.0.0
- AttributeError: 'TOMLDocument' object has no attribute 'unwrap' HOT 1
- Implement CLI option to base versioning on latest tag only HOT 3
- configure changelog.md.j2 to have only final releases in the generated changelog.md HOT 3
- multibranch release version incorrectly incremented HOT 4
- Help not shown if semantic-release not configured HOT 2
- GitHub action raises stderr: 'error: src refspec main matches more than one HOT 3
- multibranch releases convert semver version to pep440 version HOT 2
- Relative template_dir path causes TemplateNotFound error in monorepo configuration HOT 3
- Updating version_variables that follow tag_format HOT 1
- Using with `rye build` HOT 2
- Append release notes to changelog instead of overwrite HOT 3
- Wrong way to add asset ? HOT 3
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 python-semantic-release.