Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Can Commit-Analyzer handle 2 different commit structure?

オープン
#294 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
release

調査の方向性

まず、parserOpts.mergePattern と mergeCorrespondence がコミットメッセージにどのように適用されるかを確認します。単純な fix: コミットと Azure DevOps の Merged PR #####: fix: コミットの両方について、既存の commit-analyzer の動作を確認します。両方の構造が認識され、相互排他的な設定を必要とせずに期待されるバージョン分析がトリガーされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Let's say I have a commit which look like that:
fix: this is an example
Commit-analyzer is detecting this commit and triggers a patch version - which is the expected behaviour.

Then I complete a PR which creates a new commit:
Merged PR 11111: fix: this is another example
Commit-analyzer can't detect the commit fix: this is another example because of the prefix that Azure Devops adds to the commit it generates when completing a PR (Merged PR 1111: ). So I have found the mergePattern property inside parserOpts and I added a regex that inform commit-analyzer about the prefix:

parserOpts: {
   mergePattern: /^Merged PR (\d+): (\w*)(?:\(([\w\$\.\-\* ]*)\))?\: (.*)((.|\n)*)/,  
   mergeCorrespondence: ['id', 'type', 'scope', 'subject'],
   noteKeywords: ["BREAKING CHANGE", "BREAKING CHANGES"]
}

Now commit-analyzer has been able to detect the relevant commit content within this commit structure.

My problem is that now, with the mergePattern attribute defined to look for specific structure - a regular commit such as the first example fix: this is an example won't be considered as a valid commit and no version will be triggered.

There is an option to support both types of commits? with and without Merged PR #####: prefix?

Thanks.

主要言語
JavaScript
スター
447
フォーク
82
平均マージ
7時間 53分
マージ済み PR(30日)
9

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

semantic-release/commit-analyzer のほかの issue

semantic-release/commit-analyzer の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。