Skip to content

Commit

Permalink
fix(notify): git log parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Dec 26, 2023
1 parent 0eeacb0 commit e38f945
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/notify/lib/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ function getLogs() {

const DEPOT_URL = `${PROJECT_WEB_URL}/d/${DEPOT_NAME}`;

const headerPattern = /^(\w*)(?:\((\S*)\))?:\s?(.*)$/;

function getCommits() {
const io =
GIT_COMMIT && GIT_COMMIT === GIT_PREVIOUS_COMMIT
Expand All @@ -164,7 +166,7 @@ function getCommits() {
getLogs().map(({ abbrevHash, hash, subject }) => ({
hash,
abbrevHash,
message: sync(subject),
message: sync(subject, { headerPattern }),
subject,
url: `${DEPOT_URL}/git/commit/${hash}`,
})),
Expand Down
2 changes: 1 addition & 1 deletion packages/notify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bring-it/notify",
"version": "0.2.11",
"version": "0.2.12",
"description": "Send releases notifications",
"license": "MIT",
"author": {
Expand Down

0 comments on commit e38f945

Please sign in to comment.