npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cz-jira-smart-commit-validated

v1.1.0

Published

A commitzen adapter for Jira smart commit with validations

Downloads

18

Readme

npm (scoped) semantic-release npm

cz-jira-smart-commit-validated

About

Standardize your team's commits using this adapter for commitzen.

This adapter makes it possible to specify and validate the commit of a project that uses Jira as a tool of management. Using this tool you can benefit from using Jira's smart commit commands more easily without having to worry about remembering which commands are available and which syntax must be respected. Besides, it is a perfect adapter to be used together with semantic versioning.

This adapter was based on cz-jira-smart-commit and cz-conventional-changelog.

Highlights

  • Standardizes the squad commit;
  • Can be used together with semantic-release;
  • Prevents typing errors, preventing an erroneous flow in relation to smart commit commands;
  • Prevents an invalid team from being informed to Jira, forcing the default(1w 1d 1h 1m);
  • Prevents an Issue ID from being informed with a key different from the one specified as default;
  • Validates the commit title size respecting the defined limitation.

Example

Flow sample: sampleFlow

Sample of the result of mounting the commit using this adapter: sampleFlow

Installation

If using yarn:

yarn add cz-jira-smart-commit-validated

If using npm:

npm i cz-jira-smart-commit-validated

Usage

Reference cz-jira-smart-commit-validated path in commitzen path property:

{
    ...
 "config": {
        "commitizen": {
            "path": "./node_modules/cz-jira-smart-commit-validated",
            "disableScopeLowerCase": false,
            "disableSubjectLowerCase": false,
            "maxHeaderWidth": 100,
            "maxLineWidth": 100,
            "defaultType": "",
            "defaultScope": "",
            "defaultSubject": "",
            "defaultBody": "",
            "defaultIssuesPrefix": "EVOLOG",
            "enableMultiIssuesIdByCommit": false
        }
    }
}

Example of what would look like package.json of a project using cz-jira-smart-commit-validated.

To use adapter after integration with commitzen, just run:

git cz

or if you prefer, you can use husky to trigger the hook prepare-commmit-msg. Inside this hook this line should be executed:

exec < /dev/tty && node_modules/.bin/cz --hook || true

Example of how the hook would look:

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

    exec < /dev/tty && node_modules/.bin/cz --hook || true

So whenever the command is executed:

git commit

The commitzen will be triggered via the husky using cz-jira-smart-commit-validated.

Documentation

cz-jira-smart-commit-validated

| Property Name | Environment Variable Name | Description | Default | | --------------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | types | N/A | Defines the types of changes that can be used. | conventional-commit-types | | workflowOptions | N/A | Defines the workflow options to be triggered in Jira. | workflowOptions | | defaultType | CZ_TYPE | Defines the default commit type. | "" | | defaultScope | CZ_SCOPE | Defines the default scope of the commit. | "" | | defaultSubject | CZ_SUBJECT | Defines the default commit subject. | "" | | defaultBody | CZ_BODY | Defines the default body of the commit. | "" | | defaultIssuesPrefix | CZ_ISSUES_PREFIX | Defines the default prefix for Issues, if the defaultIssuesPrefix is set to EVOLOG, then whenever the Issue ID related to the commit is requested, the Issue ID must be specified in the format EVOLOG-1234. The defaultIssuesPrefix also impacts the default Issue ID value requested by the adapter, still considering the defaultIssuesPrefix set to EVOLOG, if the branch name starts with the same name as the defaultIssuesPrefix, then the default Issue ID will be the name of the branch. | "" | | enableMultiIssuesIdByCommit | CZ_ENABLE_MULTI_ISSUES_ID_BY_COMMIT | Defines whether or not it is possible to report more than one Issue ID per commit. | false | | disableScopeLowerCase | DISABLE_SCOPE_LOWERCASE | Disables the passing of characters from scope to lowercase. | false | | disableSubjectLowerCase | DISABLE_SUBJECT_LOWERCASE | Disables the passing of characters from the commit title to lowercase. | false | | maxHeaderWidth | CZ_MAX_HEADER_WIDTH | Defines how many characters the commit title can be. | 100 | | maxHeaderWidth | CZ_MAX_LINE_WIDTH | Defines the maximum number of characters per line. | 100 |

Contributing

Pull requests are always welcome! Feel free to open a new GitHub issue for any changes that can be made.

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub

Author

Kalebe Samuel

License

MIT