Restore the blacklisters-approved/rejected icons in PR comments #11283
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We used to store these icons behind a camo.githubusercontent.com link, but attempting to access that link throws a 403 now.
Example PR comment where the image is no longer visible: #11282 (comment)
The source for these images is from https://shields.io/ 's static badge generator. It has an API that this PR uses to generate and return a specified label with a given style.
We just need a simple green/red coloring for the "blacklisters|approved" and "blacklisters|rejected" actions we perform, and the URL for that is very simple.
Here's how these two URLs will be rendered in a comment:
Where the markdown is
![Approved with SmokeyApprove](https://img.shields.io/badge/blacklisters-approved-green)
Where the markdown is
![Rejected with SmokeyReject](https://img.shields.io/badge/blacklisters-rejected-red)
Shields.io has been around for a loooong time, since 2013 (?) and is unlikely to be deprecated in the near term as far as I can tell. An alternative approach, which we could do, is to store the image in SE's i.sstatic domain instead and refer to that. I am not against changing this to do so instead of relying upon shields.io's API, if requested.