To count or compare commits is required multiple excluded refs
- Dominant language
- JavaScript
- Stars
- 27.2k
- Forks
- 5.6k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 46
Description
### Are you experiencing an issue with...
shields.io
### 🐞 Description
I've first found the issue from here:
`Can not use branch name with slashes in "GitHub commits since tagged version (branch)"` : https://github.com/badges/shields/issues/9140
The counter has counted too many commits, which has brought suspicions about algorithm of counting.
I've explained the issue here:
`To count or compare commits is required multiple excluded refs` : https://github.com/orgs/community/discussions/56342
In short, the url must has a list of exclusion (and inclusion by the way) refs to filter all them out:
`https://api.github.com/repos/OWNER/REPO/compare/{exclude-ref-1,exclude-ref-2,exclude-ref-N}...include-ref`
Or
`https://api.github.com/repos/OWNER/REPO/compare/{exclude-refs-list}...{include-refs-list}[...{exclude-refs-list}[...{include-refs-list}]]` (interleaved range filter)
### 🔗 Link to the badge
https://img.shields.io/github/commits-since/andry81/tacklebar/latest?sort=semver&label=Github%20commits%20since%20latest
https://img.shields.io/github/commits-since/andry81/tacklebar/r204-update4/dev/r204_update?label=Github%20commits%20since%20r204-update4
https://api.github.com/repos/andry81/tacklebar/compare/r204-update4...dev/r204_update
### 💡 Possible Solution
upvote the link above:
https://github.com/orgs/community/discussions/56342
:smiley:
Contributor guide
Research direction
The payload names no source files or tests. Start with the linked Shields issue and GitHub discussion, determine whether the proposed exclusion and inclusion refs are supported by GitHub's compare API, and establish an actionable implementation path with verified counts for the linked badge URLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100