Skip to content

Commit 1254504

Browse files
committed
fix(revert resolver): correct the group name
1 parent 7c10548 commit 1254504

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/git.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const ConventionalCommitRegex =
9999
const CoAuthoredByRegex = /co-authored-by:\s*(?<name>.+)(<(?<email>.+)>)/gim;
100100
const PullRequestRE = /\([ a-z]*(#\d+)\s*\)/gm;
101101
const IssueRE = /(#\d+)/gm;
102-
const RevertHashRegex = /This reverts commit (?<hash>[a-f0-9]{40})./gm;
102+
const RevertHashRE = /This reverts commit (?<hash>[a-f0-9]{40})./gm;
103103

104104
export function parseGitCommit(
105105
commit: RawGitCommit,
@@ -135,9 +135,9 @@ export function parseGitCommit(
135135

136136
// Extract the reverted hashes.
137137
const revertedHashes = []
138-
const matchedHashes = commit.body.matchAll(RevertHashRegex)
138+
const matchedHashes = commit.body.matchAll(RevertHashRE)
139139
for (const matchedHash of matchedHashes) {
140-
revertedHashes.push(matchedHash.groups.match)
140+
revertedHashes.push(matchedHash.groups.hash)
141141
}
142142

143143
// Find all authors

0 commit comments

Comments
 (0)