Comments (7)
I also want to set preset scopes! +1
from cz-cli.
Hey @Lapanoid Great idea!
Currently it isn't possible out of the box but it is funny you mention it because @leonardoanalista just published an awesome community adapter called cz-customizable. I think cz-customizable lets you do things like this. I haven't used it yet but it looks promising. Perhaps we can eventually get @leonardoanalista to merge this functionality into cz-conventional-changelog or maybe he can fashion it in a way that this project could be used by all of the adapters as long as them implement a certain interface.
Anyhow, if you don't want to use cz-customizable and you're in a pinch then you could use the following steps to create your own adapter:
- Fork the cz-conventional-changelog repo.
- Change the package.json's name and version field to be cz-my-sweet-adapter and version 1.0.0.
- Edit index.js to make the wording changes that you desire.
- Commit your changes and push them up to github.
- npm publish
- Direct your users to use cz-my-sweet-adapter instead of cz-conventional-changelog in their repo.
Now, just to be clear I do hope to offer this kind of functionality in the future but at the moment I've been focusing most of my efforts on the core cli and having a robust test suite. Things are starting to stabilize and the cli backlog is slowly shrinking as we move towards 3.0.0.
Ideally we'd have some way to offer this functionality to more than just the cz-conventional-changelog adapter, but the implementation of essentially extending an adapter seems very specific to the parent adapter. I really would rather adapters be composable instead of extended over and over.
I am still trying to figure out how we can offer a system of overrides where the needed data and parent dependencies flow down from the cli and events containing captured user data flow back up, while still allowing for robust adapter composition.
In the mean time, check out cz-customizable or try the steps above to fork and create your own adapter. Thanks for the feedback!
from cz-cli.
I have plans to improve cz-customizable module.
My plans for cz-customizable
are:
- set up semantic-releases
- unit tests
- possibly move code to ES6, if to keep consistent with commitizen module or cz-conventional-changelog codebase.
- improve the way the .cz-config.js is read
- add dry run option
- any further customization that could be useful
I am happy to either continue on cz-customizable
for now or some time later merge this into cz-conventional-changelog. I guess it makes more sense to have 1 repo instead of 2.
Personally, I would like to implement the roadmap above. It is a great chance to apply what I have been reading/watching here: https://egghead.io/series/how-to-write-an-open-source-javascript-library
@Lapanoid, I have done exactly those steps to fork cz-conventional-changelog.
We are going to use cz-customizable
across 5 or 7 teams, some projects are Java and others are AngularJs. Projects have different scopes for sure. That was the motivation behind this module.
Leonardo Correa
from cz-cli.
@jimthedev Is there any plans to add custom scope feature to commitizen?
from cz-cli.
Plans, yes, but no timeline. I’m currently on paternity with our second child. I will accept PRs for this of course.
from cz-cli.
Oh Great! Congratulations!
I will take a look and will submit a PR if I come up with a good solution.
from cz-cli.
@leonardoanalista Do you want to merge your changes to cz-conventional-changelog project as mentioned in your previous message?
from cz-cli.
Related Issues (20)
- Can not write sentence case in when writing short description for change. HOT 2
- Vulnerability: Prototype Pollution via the main (merge) function HOT 2
- NPM warning breaks `cz` prompts when using `scripts` entry
- commitizen produces empty commit message after answering prompts HOT 3
- Showing timing (progress) during commit cli
- Text alignment issues in smaller terminal windows on Mac HOT 2
- bug: issue with LRU cache, cannot execute `git-cz`
- [Config loader] check if config key is in package.json before accepting it as a config file HOT 1
- Weird behaviour when using cz cli (global) outside a git repo
- pathspec 'git' did not match any file(s) known to git HOT 2
- Feature request: Submit on the command line: Is there a way to return to the previous field? HOT 1
- Feature request: Whether to support multiple types of commits in one submission HOT 1
- commit npm script actually works
- husky hook does not work HOT 2
- Nestor David Sánchez
- Behaves the same as git commit HOT 1
- Provide a way to prompt to amend commit message only
- cz commit error
- Question: Is it possible to write an adapter in ES6?
- Cannot create release version after creating a pre-release version
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 cz-cli.