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

remove prefix v for commit hash version #10597

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

jNullj
Copy link
Member

@jNullj jNullj commented Oct 11, 2024

ignore commit hash in addv

Fixes #10591 - see issue for more info

some services might return version as a commit hash like aur.
it makes no sense to prefix v before the commit.

Fixes badges#10591
add both full commit hash and short commit hash tests to addv.
expected result - no v prefix.
Copy link
Contributor

Messages
📖 ✨ Thanks for your contribution to Shields, @jNullj!

Generated by 🚫 dangerJS against d0091f7

@jNullj jNullj added core Server, BaseService, GitHub auth, Shared helpers javascript [dependabot only] Pull requests that update Javascript packages labels Oct 11, 2024
@@ -127,11 +127,12 @@ function omitv(version) {
return version
}

const ignoredVersionPatterns = /^[^0-9]|[0-9]{4}-[0-9]{2}-[0-9]{2}/
const ignoredVersionPatterns =
/^[^0-9]|[0-9]{4}-[0-9]{2}-[0-9]{2}|^[a-f0-9]{7,40}$/
Copy link
Member

Choose a reason for hiding this comment

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

I was also thinking about how to deal with short/long hashes
I like this approach 👍

@chris48s chris48s added this pull request to the merge queue Oct 12, 2024
Merged via the queue into badges:master with commit f767fab Oct 12, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Server, BaseService, GitHub auth, Shared helpers javascript [dependabot only] Pull requests that update Javascript packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

don't add v prefix to commit hash "version"s
2 participants