Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Github CommitLink无法使作用域成为可选的_Github_Commit_Github Actions - Fatal编程技术网

Github CommitLink无法使作用域成为可选的

Github CommitLink无法使作用域成为可选的,github,commit,github-actions,Github,Commit,Github Actions,我正在尝试使用问题前缀来获得我的提交格式,如下所述 JIRA-ID: type(scope): Subject 范围应该是可选的。 这意味着以下是有效的消息 AAAA-12:修复(测试):修复了失败的测试 AAAA-12:修复:修复了失败的测试 下面是我的commitlint.config.js的样子 module.exports = { extends: ['@commitlint/config-conventional'], parserPreset: {

我正在尝试使用问题前缀来获得我的提交格式,如下所述

JIRA-ID: type(scope): Subject
范围应该是可选的。 这意味着以下是有效的消息

  • AAAA-12:修复(测试):修复了失败的测试

  • AAAA-12:修复:修复了失败的测试

下面是我的commitlint.config.js的样子

module.exports = {
    extends: ['@commitlint/config-conventional'],
    parserPreset: {
           parserOpts: {
              headerPattern: /^[A-Z]{1,4}-[0-9]{1,4}:\s(\w*)\((\w*)\):\s(.*)$/,
              headerCorrespondence: ["type", "scope", "subject"],
              issuePrefixes: ["^[A-Z]{1,4}-[0-9]{1,4}"],
              referenceActions: ["xxx-"] // (!!)
            }
      },
 rules: {
        'references-empty': [2, 'never'],
       'scope-empty': [1, 'never'],
      ...
     ... 
}
}
以下消息似乎无效

AAAA-12: fix: fixed the failing test
AAAA-12(): fix: fixed the failing test
它迫使我使用空括号,如下所述