Skip to content

New feature: Suggest license directly from site to third-party repository? #401

Closed

Description

@kfogel

It would be wonderful if one could go to http://choosealicense.com/, pick a license, and click a button to create a new pull request that suggests that license to a currently unlicensed third-party repository.

For example, today I ran across this repository on GitHub: https://github.com/ys/forked (the code behind the very useful Stargazers forks web service). The repository doesn't have any license file at all. It's quite likely that @ys meant it to be open source software, and simply never bothered to put an explicit license on the tree. But the easiest way to ask @ys would just be to make a PR that adds a license he would be likely to find acceptable. So I was going to create a PR that adds the text of the MIT license in a LICENSE.md file at the top level of the ys/forked tree... And then I thought, gosh, it would be so much easier if I could just go to http://choosealicense.com/, pick the obvious license (in this case MIT), and click a button to do create the PR for me! A form field would open up, asking me for name of the repository where the PR should be created. If I'm a member of one or more GitHub organizations, then there would be an intermediate chooser UI widget to ask me where the PR should come from (the same widget that comes up when you're logged in to GitHub and you click "fork" on a repository, and GitHub asks you where you want the new fork to be).

Once I've answered these easy one or two questions, the rest is fully automatic. No manual copy-and-paste of license text, no clicking around the manual PR creation interface, no need for me to write the commit message -- all of this can be automated by choosealicense.com.

I think if we had this feature, it could result in a lot more repositories getting clear open source licenses.

Thoughts?

-Karl

Activity

  1. mlinksva commented on Apr 28, 2016

    @mlinksva
    Contributor

    I've wanted this to use and to point others to, eg when I wrote 72f852f#diff-4b7241b75e16fdab61fb0f7ff4fa6f7fR25

    I imagine (but have made zero attempt to verify) that it'd be possible to implement all of this on choosealicense.com with client side javascript, perhaps using https://github.com/philschatz/octokat.js ... otherwise substantial changes would be needed, eg a non-static site.

    Completely welcome more informed feedback.

    Just to state the obvious, choosealicense.com may not be the only site from which this functionality would be useful, e.g., opensource.org, github.com, though those are doubtless much harder for various reasons.

    Also obviously some guidance needs to be built in so that any requests created are appropriate and most likely to be well received. Adding more guidance on suggesting a license to a project that isn't one's own to above file, on site as http://choosealicense.com/no-license/#for-users might be a small step forward.

  2. kfogel commented on Apr 28, 2016

    @kfogel
    Author

    @mlinksva, how on earth did you see this so fast? +1 on all the above.

    Nice changes, btw. Particularly liked the s/protection/restriction/ ! :-)

  3. ShaneCurcuru commented on May 5, 2016

    @ShaneCurcuru
    Contributor

    Yes, this would be a killer feature for choosealicense.com - it allows the larger community to help guide projects and propose license suggestions directly, which is much more effective when it's presented within the github flow to the un-licensed repository maintainers.

    Note that it would be nice to see a brief boilerplate in the long description of the PR that told the recipient what the change meant, and reminded them briefly to go read the license on choosealicense.com so they can truly understand what accepting the PR means.

  4. mlinksva commented on May 5, 2016

    @mlinksva
    Contributor

    https://github.com/issues?q=choosealicense.com finds some issues and pull requests across github.com referencing choosealicense.com, many asking a project to add a license. I wonder if there's anything to be learned from these interactions, e.g., to inform a brief boilerplate.

  5. strugee commented on Sep 12, 2016

    @strugee

    See also addalicense.com (which is broken, but still)

  6. mlinksva commented on Jun 17, 2018

    @mlinksva
    Contributor

    For awhile it's been possible now to construct a URL to suggest a license to a third-party repo:

    https://github.com/{USER|ORG}/{REPO}/community/license/new[?template={LCASE_SPDX_ID}]

    The template parameter is optional; use to preselect a license, previously mentioned at #496 (comment).

    Background:

    I forgot about this issue in the meantime.

    I suppose this feature could be integrated into choosealicense.com, though a user would need to input the repo they want to suggest a license for. I have no UI ideas but welcome them. Someplace innocuous to experiment might be a little form below the ask maintainers nicely part of https://choosealicense.com/no-permission/#for-users

    (Also suggested at librariesio/libraries.io#2187 as that site already has a relevant UI, which could just use a more convenient link.)

  7. mlinksva commented on Oct 19, 2018

    @mlinksva
    Contributor

    FYI: #610 has an implementation of this, hoping to merge soon but welcome feedback.

    One obvious feedback might be to support non-github.com sites: I don't see why that wouldn't be possible, given support for a license suggestion URL like the above and a repository license API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions