question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compatibility with conventional changelog

See original GitHub issue

This package is not compatible with cz-conventional-changelog-with-jira or @digitalroute/cz-conventional-changelog-for-jira. Is the a way to befried them?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

18reactions
GeorgeBugackovcommented, Oct 14, 2020

How can I use basic commitlint conventional-config with jira-config.

I need to obligate my developers to have commit in for of:

feat: PRJ-1111: subject of a change or at least feat (PRJ-1111): subject of a change. But problem with PRJ in (scope) is that scope is not obligatory by conventional commit spec.

Or is there any other way to make people commit both type: and JIRA task-id: ?

8reactions
lavagricommented, Aug 5, 2022

If someone still searching simple solution for feat(PRJ-1111): subject of a change format (@GeorgeBugackov) I found for my team this commitlint.config.js setup works ok:

const { rules: jiraRules } = require('commitlint-plugin-jira-rules');
const { rules: configRules } = require('commitlint-config-jira');

// get list of jiraRules
const jiraMessageRules = Object.keys(jiraRules);

module.exports = {
    extends: ['@commitlint/config-conventional'],
    plugins: [
        {
            rules: {
                ...jiraMessageRules.reduce((acc, ruleKey) => {
                    acc[ruleKey] = function(input, when, options) {
                        // remove conventional commit context from message
                        const jiraMessage = `${input.scope}: ${input.subject}`;
                        return jiraRules[ruleKey]({ raw: jiraMessage }, when, options);
                    };
                    return acc;
                }, {})
            }
        }
    ],
    rules: {
        ...configRules,
        // your custom rules
        'jira-task-id-min-length': [2, 'never', 0],
        'jira-task-id-project-key': [2, 'always', ['PRJ', 'NO-JIRA']]
    }
};

#43

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conventional Commits & Dynamic Changelog | by Alex Ferreira
Conventional commits is simply a way of describing our commit messages using a convention that allows them to be easily read by a...
Read more >
conventional-changelog-cli - npm
Generate a changelog from git metadata. Latest version: 2.2.2, last published: a year ago. Start using conventional-changelog-cli in your ...
Read more >
Tooling for Conventional Commits
Versio: A monorepo-compatible tool that updates version numbers based on conventional commits and project dependencies. It can generate tags and changelogs, ...
Read more >
conventional-changelog | Yarn - Package Manager
2 (2015-06-29) ... 0.1.0-alpha.1 (2015-06-24) ... BREAKING CHANGES. This module is rewritten so API is changed and it is not backward compatible. Please...
Read more >
conventional-changelog-project - npm package - Snyk
conventional -changelog-project ... Commits that follow a standard and descriptive format can be parsed programmitically to learn much about the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found