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

add badge next to github PR and issues #3205

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mustakimali
Copy link

@mustakimali mustakimali commented Dec 10, 2021

This PR updates the generate-book.sh to find all github issue and PR links in the output and add beautiful shields.io badges to show the status (merged/open etc.).

(Note: shields.io has updated to use GitHub's purple color for "closed". The screenshots below have not been updated.)

image

image

Open Questions

  • Should it replace the text and be a link itself?
  • any other type of badges?
  • Should it handle github links that are not clickable? example is RFC 2528 - i can give it try if this PR gets approved.
  • This currently handles all github issue and PR link (second image above is a PR in mozilla/rust repo) should it be restricted to links in rust-lang/* repos only?
  • OR should this script just update the source files (from text/ folder) to bring the changes under source control?

Why?

Being an absolute noob in Rust and due to lack of understanding of the lifecycle of RFCs, I recently spent a lot of time trying to get something working. Just to realise the RFC wasn't incorporated in the language. A badge next to these links would probably make it easier to me to spot this.

Feel free to approve this if you think this will be useful for other. You may also have good reason to not load resources from external site. Thank you either way. 🙏

@mustakimali mustakimali marked this pull request as ready for review December 10, 2021 23:24
@ehuss ehuss added the not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc. label Dec 11, 2021
@calebcartwright
Copy link
Member

I think this is an interesting idea, although also speaking as a maintainer of the Shields.io service, I'm wondering if the fact that we still use a red color for closed issues on the badges (GitHub semi-recently switched this to purple) might be problematic in this context give the typical connotations associated with red. I.e. what's the potential for some folks to be confused/misinterpret a red badge as the issue having been rejected/declined/etc.

@mustakimali
Copy link
Author

might be problematic in this context give the typical connotations associated with red. I.e. what's the potential for some folks to be confused/misinterpret a red badge as the issue having been rejected/declined/etc.

This is a good point, sheilds.io could match the colour used in github. However in this context, either colour could be a visual cue to for the folks to go and have a look at the issue itself.

It would be great if there was a reliable way to determine if an rfc has been implemented. I see a label B-RFC-approved used but not sure if this gets removed once the work is done.

@calebcartwright
Copy link
Member

might be problematic in this context give the typical connotations associated with red. I.e. what's the potential for some folks to be confused/misinterpret a red badge as the issue having been rejected/declined/etc.

This is a good point, sheilds.io could match the colour used in github. However in this context, either colour could be a visual cue to for the folks to go and have a look at the issue itself.

It would be great if there was a reliable way to determine if an rfc has been implemented. I see a label B-RFC-approved used but not sure if this gets removed once the work is done.

badges/shields#7372

@calebcartwright
Copy link
Member

Just a heads up that I've updated Shields so probably a good idea to update the screenshots in the description too whenever you get a chance.

https://img.shields.io/github/issues/detail/state/rust-lang/rust/13885

Afterwards it may be worth having this thread of comments hidden since it was a tangential topic that's subsequently been resolved (though will differ that to those with access)

@joshtriplett
Copy link
Member

@mustakimali If you can rebase this to apply again, I'd be happy to see it merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants