Skip to content

Commit

Permalink
Fixed detecting emojis
Browse files Browse the repository at this point in the history
- apparently the regex didn't work for all emojis, so this switches to
  comparing against the list in `gitmojis`, which is what we actually
  want anyway
  • Loading branch information
daniellockyer committed Jun 15, 2023
1 parent b604508 commit 0f8da87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
13 changes: 1 addition & 12 deletions actions/package-release/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37459,18 +37459,7 @@ const simpleGit = __nccwpck_require__(9103);

const changelogContents = changelog
.all
.filter((entry) => {
if (entry.message.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/)) {
return true;
}

const gitmoji = gitmojis.find(g => entry.message.startsWith(g.code));
if (gitmoji) {
return true;
}

return false;
})
.filter(entry => !!gitmojis.find(g => entry.message.startsWith(g.code) || entry.message.startsWith(g.emoji)))
.map((entry) => {
let message = entry.message;

Expand Down
13 changes: 1 addition & 12 deletions actions/package-release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,7 @@ const simpleGit = require('simple-git');

const changelogContents = changelog
.all
.filter((entry) => {
if (entry.message.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/)) {
return true;
}

const gitmoji = gitmojis.find(g => entry.message.startsWith(g.code));
if (gitmoji) {
return true;
}

return false;
})
.filter(entry => !!gitmojis.find(g => entry.message.startsWith(g.code) || entry.message.startsWith(g.emoji)))
.map((entry) => {
let message = entry.message;

Expand Down

0 comments on commit 0f8da87

Please sign in to comment.