Download the PHP package fperezco/captainhook-conventional-branchs-commits without Composer

On this page you can find all versions of the php package fperezco/captainhook-conventional-branchs-commits. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package captainhook-conventional-branchs-commits

Captain Hook PHP conventional commits on conventional branch checker

Captain hook conventional branch commits is just a 'hook' to check that a commit, in a conventional branching model, follows the conventional rules.

Usage

The conventional branch and commit checker script will be executed on every commit.

By default, the branch should follow the conventional branches rules: https://conventional-branch.github.io/

And, by default, the commits the conventional commits rules: https://www.conventionalcommits.org/en/v1.0.0/

If the branch or commit message does not follow the rules, the commit will be rejected.

Installation

Previously you have should installed captainhook in your project. See: https://github.com/captainhookphp/captainhook

Install this package using:

After that, you should configure the commit-msg hook by doing:

That command will install the selected config in the commit-msg hook in captainhook.json. By default( option 1), empty configuration so only check for standard conventional commits and branches will be installed.

Configuration

The available variables in the commit-msg hook section for this validator are:

"branchPattern": "/^(develop|master|main|(feature|bugfix|hotfix|chore|release)\\/\\w+(-.*)?)$/",
"commitPattern": "/^(customcommit|patterncommit): [A-Za-z0-9-]+$/",

"branchShouldIncludeTicketCode": true,
"branchTicketCodePattern": "/^([A-Z]+-[0-9]+)$/",

"commitShouldIncludeTicketCode": true,
"commitTicketCodePattern": "/^([A-Z]+-[0-9]+)$/",

"commitAndBranchShouldIncludeTheSameTicketCode": true,
"commitAndBranchCommonTicketCodePattern": "/^([A-Z]+-[0-9]+)$/",
"commitAndBranchCommonTicketCodePatternBranchExceptionsPattern": "/^(develop|master|main)$/"

The main variables are those to define the branchPattern and commitPattern.

The pattern that the branch should follow. If no provided, the default is the conventional branches pattern:

The pattern that the commit should follow. If no provided, the default is the conventional commits pattern (in this case skipping Merge commits):

If your project requires to provide a specific ticket code always you can set this section, by default/not defined the check is disabled:

If your project requires to provide a specific ticket code in the commit message, you can set this section, by default/not defined the check is disabled:

If your project requires that the commit and branch should have the same ticket code in the branch name and in the commit message , you can set this section, by default/not defined the check is disabled:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change

License

MIT


All versions of captainhook-conventional-branchs-commits with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
captainhook/captainhook Version ^5.18
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fperezco/captainhook-conventional-branchs-commits contains the following files

Loading the files please wait ...