Skip to content
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

fix: format builder name and rewards leaderboard name alignment #400

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

antomor
Copy link
Collaborator

@antomor antomor commented Nov 23, 2024

What

  • format builder name to remove initial brackets
  • align builder name in leaderboard

@antomor antomor self-assigned this Nov 23, 2024
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@antomor antomor requested a review from a team November 24, 2024 13:56
@DinizSa
Copy link
Contributor

DinizSa commented Nov 24, 2024

I could not test locally the initial brackets removal, but apart from that, LGTM

Comment on lines +5 to +9
const bracketIndex = name.indexOf(']')
if (bracketIndex !== -1) {
return name.slice(bracketIndex + 1).trimStart()
}
return name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const bracketIndex = name.indexOf(']')
if (bracketIndex !== -1) {
return name.slice(bracketIndex + 1).trimStart()
}
return name
return name.replace(/^[^\]]*\]\s*/, '');

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jurajpiar thank you for the suggestion, but I've avoided the regexp on purpose since I find them less readable and with more difficulty to debug.

Copy link
Contributor

@jurajpiar jurajpiar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@antomor antomor merged commit 0809b62 into develop Nov 25, 2024
7 checks passed
@antomor antomor deleted the fix/builder-name-format branch November 25, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants