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

increase page size for [githubrelease] badge by semver #9818

Merged
merged 1 commit into from Dec 30, 2023

Conversation

chris48s
Copy link
Member

@chris48s chris48s commented Dec 17, 2023

This was something I spotted when I was thinking about the review for #9781

If we are requesting the latest version by semver (rather than date) we request the first page of releases and search it for the latest release. The default page size is 30 releases and the max is 100.

I'm not really sure what happened here. I don't know if GitHub changed the default page size from 100 to 30 at some point or we messed this up in a refactor somewhere, but currently we only search the most recent 30 releases not the most recent 100.

The tags badge already does this correctly

static getLimit({ sort, filter }) {
if (!filter && sort === 'date') {
return 1
}
return 100
}

@chris48s chris48s added the service-badge Accepted and actionable changes, features, and bugs label Dec 17, 2023
Copy link
Contributor

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

Generated by 🚫 dangerJS against 38ae747

@chris48s chris48s changed the title increase page size for [github] release badge by semver increase page size for [githubrelease] badge by semver Dec 17, 2023
Copy link
Member

@PyvesB PyvesB left a comment

Choose a reason for hiding this comment

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

Good spot!

@chris48s chris48s added this pull request to the merge queue Dec 30, 2023
Merged via the queue into badges:master with commit 7404d4e Dec 30, 2023
23 of 27 checks passed
@chris48s chris48s deleted the gh-release-pagesize branch December 30, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants