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

use a static URL for a codeowner badge #35

Open
cjyetman opened this issue May 7, 2024 · 0 comments
Open

use a static URL for a codeowner badge #35

cjyetman opened this issue May 7, 2024 · 0 comments
Labels

Comments

@cjyetman
Copy link
Member

cjyetman commented May 7, 2024

          ![](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 #32 (comment)

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

@jdhoffa jdhoffa added the ADO label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants