Skip to content

API and GitHub LICENSE links inconsistency #1525

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

Open
alex-bacart opened this issue Sep 8, 2022 · 1 comment
Open

API and GitHub LICENSE links inconsistency #1525

alex-bacart opened this issue Sep 8, 2022 · 1 comment

Comments

@alex-bacart
Copy link

alex-bacart commented Sep 8, 2022

Description

There's an inconsistency in GitHub website and API responses.

For example you can take this exact repository. On readme page you have a "MIT license" link with address https://github.com/github/rest-api-description/blob/main/LICENSE.md

But API response returns an invalid address for license link.

curl 'https://api.github.com/repos/github/rest-api-description/readme' \
--header 'Accept: application/vnd.github.html'

Expected link address

https://github.com/github/rest-api-description/blob/main/LICENSE.md

Actual link address

LICENSE.md

Issue

This relative link gives 404 pages in any of the following relations:

More affected repositories

Every repository having license links in format LICENSE and ./LICENSE is affected. Just a few of them:

@alex-bacart
Copy link
Author

alex-bacart commented Sep 8, 2022

More simple reproduction script:

curl 'https://api.github.com/repos/github/rest-api-description/readme' \
--header 'Accept: application/vnd.github.html' | grep "MIT license"

Result:

<p dir="auto">github/rest-api-description is licensed under the <a href="LICENSE.md">MIT license</a></p>

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

No branches or pull requests

1 participant