GithubHelp home page GithubHelp logo

conventional-commits / php-commitizen Goto Github PK

View Code? Open in Web Editor NEW
109.0 5.0 12.0 41 KB

PHP Commitizen - A CLI tool used to create commits according to Conventional Commits specification

Home Page: https://conventionalcommits.org/

License: MIT License

PHP 100.00%
php conventional-commits conventional-changelog git commit commitizen php-commitizen

php-commitizen's People

Contributors

adgaray avatar damianopetrungaro avatar ramsey avatar sensorario avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

php-commitizen's Issues

Adding the ability to check the format for latest commits

Hi, I'm interested to integrate the commitizen 'norm' into some projects and it will be great to have a tool that check (probably a nice regex) the last commits in a CI job. Do you plan to do something like this in the futur? Or can we submit some PR in that way? Thank you in advance, best regards.

Error with package symfony/console v5.1.2

Hi.
I'm triying to install the package but got this error
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for damianopetrungaro/php-commitizen ^0.1.2 -> satisfiable by damianopetrungaro/php-commitizen[v0.1.2].
- Conclusion: remove symfony/console v5.1.2
- Conclusion: don't install symfony/console v5.1.2

I'm using laravel framework version 7.0

Thanks.

Gitmoji and questions at customize configs

Pretty much I would like to replicate my QCA process on a Python project that I to my current PHP Project in current development, I have with the following configurations. Beacuse I do believe that gitmoji should be a good tool to consider when it comes to conventional commits. Is there's a way to config that?

[tool.commitizen.customize]
message_template = "{{change_type}}{% if scope != '' -%}({{ scope }}){% endif %}: {{message}}{% if description != '' -%}{{'\n'}}{{'\n'}}{{description}}{% endif %}{% if issues != '' -%}{{'\n'}}{{'\n'}}{%for issue in issues.split(',')%}Closes #{{issue.strip()}} {%endfor%}{% endif %}"
example = ":sparkles: feat: this feature enable customize through config file"
schema = "<type>(<scope>): <subject>\n<BLANK LINE>\n<body>\n<BLANK LINE>\n<issues>"
schema_pattern = ":+[a-z_0-9]+:+ +(breaking|feat|bugfix|hotfix|refactor|perf|docs|test|style|build|chore|ci|arch|wip|package|poop|bump)+(([(]+[a-z_0-9]+[)])?)+:(\\s.*)"
bump_pattern = "^(:boom: breaking|:sparkles: feat|:bug: bugfix|:ambulance: hotfix|:recycle: refactor|:zap: perf)"
bump_map = {":boom: breaking" = "MAJOR", ":sparkles: feat" = "MINOR", ":bug: bugfix" = "PATCH", ":ambulance: hotfix" = "PATCH", ":recycle: refactor" = "PATCH", ":zap: perf" = "PATCH"}
change_type_order = ["breaking", "feat", "hotfix", "bugfix", "perf"]
info = """
BREVETECH GITMOJI COMMITIZEN TEMPLATE FOR PYTHON PROJECTS.

This is a customized version of the commitizen template, based on a extended version of conventional commits.

Includes more change types and a customized message template. Also includes gitmoji and github issues support.

Question validation features are not implemented yet.
"""
commit_parser = '^(?P<change_type>:boom: breaking|:sparkles: feat|:bug: bugfix|:ambulance: hotfix|:zap: perf)+(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?:\s(?P<message>.*)?'
changelog_pattern = "^(:boom: breaking|:sparkles: feat|:bug: bugfix|:ambulance: hotfix|:zap: perf)"
change_type_map = {":boom: breaking" = "๐Ÿ’ฅ Breaking changes",":sparkles: feat" = "โœจ Features", ":bug: bugfix" = "๐Ÿ› Fixed Bugs", ":recycle: refactor" = "โ™ฒ Refactorings", ":zap: perf" = "โšก Performance improvements"}

[[tool.commitizen.customize.questions]]
type = "list"
name = "change_type"
choices = [
    {value = ":boom: breaking", name = "๐Ÿ’ฅ breaking: Use to indicate a breaking change. Correlates to MAJOR in SemVer."},
    {value = ":sparkles: feat", name = "โœจ feat: Add a new feature. Correlates to MINOR in SemVer"},
    {value = ":bug: bugfix", name = "๐Ÿ› bugfix: Solves a non critical bug. Correlates to PATCH in SemVer"},
    {value = ":ambulance: hotfix", name = "๐Ÿš‘ hotfix: Solves a critcal bug or error. Correlates to PATCH in SemVer"},
    {value = ":recycle: refactor", name = "โ™ป๏ธ refactor: Code change that neither fixes a bug nor add a feature. Correlates to PATCH in SemVer"},
    {value = ":zap: perf", name = "โšก perf: Change that improves performance. Correlates to PATCH in SemVer"},
    {value = ":memo: docs", name = "๐Ÿ“ docs: App or code documentation only change."},
    {value = ":white_check_mark: test", name = "โœ… test: Add or modify tests."},
    {value = ":art: style", name = "๐ŸŽจ style: Apply visual changes to the codebase."},
    {value = ":construction_worker: build", name = "๐Ÿ‘ท build: Changes that affect the build system or external dependencies (example scripts, environment variables, etc.)"},
    {value = ":wrench: chore", name = "๐Ÿ”ง chore: Changes to development related tools and settings that doen't add or modify source code (example linting, deploying, etc.)"},
    {value = ":green_heart: ci", name = "๐Ÿ’š ci: Changes to the CI or CD tools."},
    {value = ":building_construction: arch", name = "๐Ÿ— arch: Changes to the architecture of the application like moving, dividing or merging files."},
    {value = ":construction: wip", name = "๐Ÿšง wip: Work in progress. Use when commit does not ends a feature, fix or other changes."},
    {value = ":twisted_rightwards_arrows: sync", name = "๐Ÿ”€ sync: Synchronize or merge code with remote repository."},
    {value = ":rewind: revert", name = "โช revert: Revert to a previous commit."},
    {value = ":package: package", name = "๐Ÿ“ฆ package: Changes to the project dependencies or package manager."},
    {value = ":poop: improvable", name = "๐Ÿ’ฉ poop: Commit code that needs to be refactored later. Use when you need to refactor code but don't have time to do it right now."},
]
message = "Select the type of change you are committing"


[[tool.commitizen.customize.questions]]
type = "input"
name = "scope"
message = "What is the scope of this change? (app name, package name, function, setting scope, etc.) [ENTER to skip]"
default = ""

[[tool.commitizen.customize.questions]]
type = "input"
name = "message"
message = "Write a short, imperative tense description of the change (lowercase, no periods)\nFor example: add feature xyz, fix bug 123, deprecate abc\n"

[[tool.commitizen.customize.questions]]
type = "input"
name = "description"
message = "Write a longer description of the change. Feel free to use gitmoji for each sentence. [ENTER to skip]\n"
default = ''

[[tool.commitizen.customize.questions]]
type = "input"
name = "issues"
message = "Write closed github issues if there are, comma separated.\nPLEASE BE CAREFUL, INPUT VALIDATION IS NOT IMPLEMENTED YET. [ENTER to skip]\n"
default = ''

New release

Hi,

Would you be so kind as to make a new release so we can use this package with Symfony 5 ?

Thanks a lot

FAQ

OMG, can't figure out how to use it... tried with your command vendor/bin/php-commitizen commit than put scope, description and on finishing gives error: Custom configuration file must return an array
tried append vendor/bin/php-commitizen commit --config=/var/.../commitizen-config.php, vendor/bin/php-commitizen commit -a --config /var/.../commitizen-config.php, vendor/bin/php-commitizen commit commitizen-config.php, sometime they found my config, but in result anyway dont works...

"damianopetrungaro/php-commitizen": "^0.2.0",
php: 8.2

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.