-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
conventional-commits
- Fix label for messages starting with backtick
#8427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Where did you take the screenshot? That URL. There are also a number of test URLs at the bottom of the feature's source code. I'd like to see what it looks like on those, particularly on https://github.com/refined-github/sandbox/pull/91/commits. Check the entire list, especially at the bottom. |
🤡 <- me
It's a private company repo, gonna use the urls in the bottom of the file and gonna create a dummy repo As of this comment the only difference is the Apart from the duplication, I guess should avoid adding the label when the scope has backticks |
fcac3d6
to
9dbd793
Compare
Boi, GH sure do some shenanigans with their markup, i tried to have both PR updated with my test URL and control screens of the already present test URLs. |
Yeah that's why the code was written this way, I don't want the feature to support/break the formatting. If the scope contains formatted code, then it's "invalid" according to the spec we're following. |
I've updated both the commit and the PR description to adhere to our spec, with example screenshots too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Apparently, the problem with the label not showing up when the message starts with a backtick, was fault of:
refined-github/source/features/conventional-commits.tsx
Line 27 in 1f6ec8a
The
commit.raw
andtextNode.textContent
were identical and no sibling was found because the<code>
element is insidecommitTitleElement
, not as a sibling.By counting the children, the
<code>
element or any element should avoid the early return, as text nodes don't count as childElements.Test URLs
https://github.com/loky-lp/rgh-dummy-conventional-commits/commits/main
https://github.com/refined-github/sandbox/pull/91/commits
Screenshot
Before:

After:

Control
Before:

After:

Closes: #8223