Are you experiencing an issue with...
shields.io
🐞 Description
The badge path /github/issues/detail/state/:user/:repo/:number mislabels closed-but-unmerged PRs as merged.
GitHub’s issues API for PRs omits the top-level merged_at field, so the current logic
json.merged_at !== null evaluates true when the field is missing (undefined !== null).
This makes the badge render merged incorrectly.
🔗 Link to the badge
https://img.shields.io/github/issues/detail/state/go-vgo/robotgo/753?style=flat-square
go-vgo/robotgo#753
💡 Possible Solution
When pull_request exists, use pull_request.merged_at to determine merge state.
Fallback to top-level merged_at if present. Treat null/undefined as not merged.
This fixes the misclassification without adding an extra API request.
Are you experiencing an issue with...
shields.io
🐞 Description
The badge path
/github/issues/detail/state/:user/:repo/:numbermislabels closed-but-unmerged PRs as merged.GitHub’s issues API for PRs omits the top-level
merged_atfield, so the current logicjson.merged_at !== nullevaluatestruewhen the field is missing (undefined !== null).This makes the badge render
mergedincorrectly.🔗 Link to the badge
https://img.shields.io/github/issues/detail/state/go-vgo/robotgo/753?style=flat-square
go-vgo/robotgo#753
💡 Possible Solution
When
pull_requestexists, usepull_request.merged_atto determine merge state.Fallback to top-level
merged_atif present. Treatnull/undefinedas not merged.This fixes the misclassification without adding an extra API request.