Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Use latest tag for image source URL in the readme #1032

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jerthiry
Copy link

@jerthiry jerthiry commented Dec 27, 2017

Description of the Change

The source for the images of the README of uninstalled packages are now taken from the latest tag instead of defaulting to repo/blob/master. This default behavior caused some images to not appear.

Before

atom-clock_before

After

atom-clock_after

Alternate Designs

It is also possible to fall back on the latest release but some repositories have tags and no release.

Benefits

Some repo do not have a master branch or the README has changed since the latest tag (no more images or filenames have changed), causing the images to not appear. Here it is not the case anymore.

Possible Drawbacks

Maybe the latest tag will be in advance compared to the available version on the package.

Applicable Issues

READMEs should fall back to latest tag, not master #1012

The issue is also referenced in #996

@jerthiry jerthiry changed the title 🐛 Use latest tag for image source URL in the readme Use latest tag for image source URL in the readme Dec 27, 2017
@jerthiry
Copy link
Author

Not quite sure how to write specs for this. For now, it tests that the URL of the relative image in the README is https://github.com/example/package-with-readme/blob/master/static/image.jpg. With this fix it would be something like https://github.com/example/package-with-readme/raw/v1.0.0/static/image.jpg, but it checks the latest tag online and there is of course none for this toy example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant