changelog-enforcer
changelog-enforcer copied to clipboard
Changelog Enforcer does not support github emojis?
Describe the bug
Recently, a group I work with in trying to enforce our own order for Github Labels, added emojis as a workaround (since Github sees them as text underneath) so we can move, say, "Non 0 Diff" early in the label dropdown.
The issue is that it looks like changelog-enforcer doesn't handle Github emojis. For example, I have in my yaml file:
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'CHANGELOG.md'
skipLabels: "Changelog Skip,0 Diff Trivial,:wrench: Github Actions"
missingUpdateErrorMessage: >
No update to CHANGELOG.md found! Please add a changelog
entry to it describing your change. Please note that the
keepachangelog (https://keepachangelog.com) format is
used. If your change is very trivial not applicable for a
changelog entry, add a 'Changelog Skip' label to the pull
request to skip the changelog enforcer.
But it looks like when the enforcer runs, the colons around :wrench: are stripped...maybe:
Run dangoslen/changelog-enforcer@v3
with:
changeLogPath: CHANGELOG.md
skipLabels: Changelog Skip,0 Diff Trivial,:wrench: Github Actions
...
Skip Labels: Changelog Skip,0 Diff Trivial,wrench,Github Actions
So :wrench: Github Actions is now wrench,Github Actions
Expected behavior
That it recognizes the emoji'd labels.
A link to or sample of your workflow
You can see my testing here:
https://github.com/mathomp4/labeltest-github-actions/pull/10
Note it might be as simple as adding : as a char in:
https://github.com/dangoslen/changelog-enforcer/blob/155ab0986bb014a46341bebdb9c5dca54e947cfd/src/label-extractor.js#L5
but I know nothing about JavaScript and maybe colons blow things up? 😄
I think you are right that this should be a simple Regex fix. Let me see what I can do.
I have a fix up in #285. If you want to test, you can always update your action temporarily to point at that branch, but I'm pretty positive via the test it will handle your use case
I have a fix up in #285. If you want to test, you can always update your action temporarily to point at that branch, but I'm pretty positive via the test it will handle your use case
Looks like it worked! Plus I learned I can do:
uses: dangoslen/changelog-enforcer@allow-for-emojis-in-labels
which is good to know.
Thanks for the quick fix!
(Now I guess I debate whether to make a feature request...)
No need for a feature request. This is definitely a bug. I'll create a v3.6.1 release in a few moments
No need for a feature request. This is definitely a bug. I'll create a
v3.6.1release in a few moments
Oh. I meant for something else I was thinking about, i.e., make a Github comment if the enforcer fails. :)