GithubHelp home page GithubHelp logo

Set custom scope changes. about cz-cli HOT 7 CLOSED

commitizen avatar commitizen commented on May 18, 2024
Set custom scope changes.

from cz-cli.

Comments (7)

mesqueeb avatar mesqueeb commented on May 18, 2024 2

I also want to set preset scopes! +1

from cz-cli.

jimthedev avatar jimthedev commented on May 18, 2024

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:

  1. Fork the cz-conventional-changelog repo.
  2. Change the package.json's name and version field to be cz-my-sweet-adapter and version 1.0.0.
  3. Edit index.js to make the wording changes that you desire.
  4. Commit your changes and push them up to github.
  5. npm publish
  6. 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.

leonardoanalista avatar leonardoanalista commented on May 18, 2024

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.

codeNoobie avatar codeNoobie commented on May 18, 2024

@jimthedev Is there any plans to add custom scope feature to commitizen?

from cz-cli.

jimthedev avatar jimthedev commented on May 18, 2024

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.

codeNoobie avatar codeNoobie commented on May 18, 2024

Oh Great! Congratulations!
I will take a look and will submit a PR if I come up with a good solution.

from cz-cli.

codeNoobie avatar codeNoobie commented on May 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.