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

Please update license so GitHub will recognize its type in the API #338

Closed
mikeschinkel opened this issue Oct 14, 2022 · 7 comments
Closed

Comments

@mikeschinkel
Copy link
Contributor

mikeschinkel commented Oct 14, 2022

I am working on a license checker using the GitHub API and it comes back with NOASSERTION for this repo rather than MIT.

Would it be possible for you to assert your license type in the Github Admin U so the API response would say MIT?

https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository

Thank you in advance or considering.

@mikeschinkel mikeschinkel changed the title Can you please assert the license type in GitHub Admin UI? Please assert the license type in GitHub Admin UI? Oct 14, 2022
@mikeschinkel
Copy link
Contributor Author

I know you have the file, but maybe it doesn't recognize it because of the .txt extension (vs. .md, or none?)

@lann
Copy link
Member

lann commented Oct 14, 2022

Github appears to know where the license is (right sidebar on desktop):

2022-10-14T09:05:47,418561351-04:00
                :point_up:

@mikeschinkel
Copy link
Contributor Author

Hi @lann — 

Thank you for such a super-quick response.

Correct. GitHub knows where your license is, but it does not recognize what your license is.

However, since I posted this issue I realized that you cannot change it via the admin UI for an existing project but instead you need to edit it so that GitHub will recognize it correctly. A PR will soon follow for this.


BTW, for clarity take a look at what Postman shows when calling the GitHub API to request your repository's license:

Postman

And here is what it looks when requesting a license that GitHub recognizes:
Google's Go License

Next here it what it looks like on the GitHub UI when GitHub knows what a license is:
GoLang license

And here it what it looks like for your repo where GitHub does not know what your license is:
Mastermind's Squirrel License

@mikeschinkel
Copy link
Contributor Author

As promised, please see #339 that would allow GitHub to recognize your license.

@mikeschinkel mikeschinkel changed the title Please assert the license type in GitHub Admin UI? Please update license so GitHub will recognize its type in the API Oct 14, 2022
@mikeschinkel
Copy link
Contributor Author

Actually, that did not fix it. Hold on the PR, please...

@mikeschinkel
Copy link
Contributor Author

Okay, so here is the fix:

Squirrel Fork with Fixed License

@lann
Copy link
Member

lann commented Oct 14, 2022

#339

@lann lann closed this as completed Oct 14, 2022
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

2 participants