RMI-PACTA / pacta.sit.rep

A simple situation report of the overall code health of the PACTA ecosystem.
Other
0 stars 0 forks source link

use a static URL for a codeowner badge #35

Open cjyetman opened 4 months ago

cjyetman commented 4 months ago
          ![](https://img.shields.io/badge/dynamic/json?color=orange&label=codeowner&query=codeownerInfo.ownersForFile&url=https%3A%2F%2Fgithub.com%2Frmi-pacta%2Fpacta.portfolio.utils%2Fdeferred-metadata%2Fmain%2F.github%2FCODEOWNERS)

Originally posted by @cjyetman in https://github.com/RMI-PACTA/pacta.sit.rep/issues/32#issuecomment-2097213161

utilizing GitHub API and shield.io

https://github.com/rmi-pacta/pacta.portfolio.utils/deferred-metadata/main/.github/CODEOWNERS returns

{"showLicenseMeta":false,"license":null,"newIssuePath":"/RMI-PACTA/pacta.portfolio.utils/issues/new","newDiscussionPath":null,"codeownerInfo":{"codeownerPath":"/RMI-PACTA/pacta.portfolio.utils/blob/main/.github/CODEOWNERS#L5","ownedByCurrentUser":true,"ownersForFile":"","ruleForPathLine":5}}

and the codeowner from that can be targeted by its object name codeownerInfo.ownersForFile in a shields.io dynamic JSON badge https://img.shields.io/badge/dynamic/json?color=orange&label=codeowner&query=codeownerInfo.ownersForFile&url=https%3A%2F%2Fgithub.com%2Frmi-pacta%2Fpacta.portfolio.utils%2Fdeferred-metadata%2Fmain%2F.github%2FCODEOWNERS

AB#10993