TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Are GitHub pull-requests governed by the original repository license?

45 点作者 dmulholl大约 3 年前
This is a question for our legal friends here on HN. Imagine this scenario: I have an open source project on Github with an MIT license. I&#x27;ve cargo-culted the<p><pre><code> Copyright (C) 2022 My Name </code></pre> line from every MIT-licensed project I&#x27;ve ever seen.<p>A random contributor forks my repository and sends me a pull-request. They haven&#x27;t altered the license file in any way.<p>So, Question 1: are their contributions automatically licensed under the same MIT license as the original repository? (Note that their fork, which I&#x27;m being asked to merge, contains the identical license file.)<p>Question 2: have they (almost certainly inadvertently) assigned copyright over their changes to me? (They&#x27;re asking me to merge changes from a repository which contains a copyright declaration in my name.)<p>Question 3: if one, why not the other?<p>Disclaimer -- personally I hate even having to think about these kinds of questions, which is why I try to make most of my open-source code available under the Unlicense [1]. I&#x27;ve recently discovered the Zero-Clause BSD licence [2] which may be a better alternative as it avoids the potentially problematic concept of a &#x27;public domain&#x27; -- I&#x27;d love to hear an informed legal analysis of their differences.<p>[1]: https:&#x2F;&#x2F;unlicense.org<p>[2]: https:&#x2F;&#x2F;opensource.org&#x2F;licenses&#x2F;0BSD

10 条评论

rectang大约 3 年前
&gt; <i>So, Question 1: are their contributions automatically licensed under the same MIT license as the original repository? (Note that their fork, which I&#x27;m being asked to merge, contains the identical license file.)</i><p>Yes — that is the common understanding, a foundation upon which vast amounts of collaborative Open Source projects are built.<p>&gt; <i>Question 2: have they (almost certainly inadvertently) assigned copyright over their changes to me? (They&#x27;re asking me to merge changes from a repository which contains a copyright declaration in my name.)</i><p>No. Copyright assignment is involved and needs more than that incidental quirk of that copyright notice in the MIT license template (which <i>is</i> confusing).<p>&gt; <i>I&#x27;d love to hear an informed legal analysis of their differences.</i><p>Go with a standard, popular FOSS license. Avoid &quot;crayon licenses&quot; which are poorly drafted, because they lead to legally ambiguous situations which serve both users and contributors poorly. Resist the urge to cut your nose off to spite your face by adopting a purposefully rebellious license.<p>The original JSON license is the crayon license whose flaws are easiest to understand. It contains the phrase &quot;shall be used for Good, not Evil&quot;, which begs the question &quot;who decides what&#x27;s evil?&quot; and opens up any user to a potential lawsuit.<p>The OSI ultimately approved the Unlicense, but with a critique. It&#x27;s flaws are not as easy to understand as those of the JSON license, but here you go:<p><a href="https:&#x2F;&#x2F;lists.opensource.org&#x2F;pipermail&#x2F;license-review_lists.opensource.org&#x2F;2020-June&#x2F;004890.html" rel="nofollow">https:&#x2F;&#x2F;lists.opensource.org&#x2F;pipermail&#x2F;license-review_lists....</a><p>&gt; <i>There is general agreement that the document is poorly drafted. It is an attempt to dedicate a work to the public domain (which, taken alone, would not be approved as an open source license) but it also has wording commonly used for license grants. There was some discussion about the legal effectiveness of the document, in particular how it would operate in a jurisdiction where one cannot dedicate a work to the public domain. The lawyers who opined on the issue, both US and non-US, agreed that the document would most likely be interpreted as a license and that the license met the OSD. It is therefore recommended for approval.</i>
评论 #30554080 未加载
评论 #30555620 未加载
评论 #30557326 未加载
评论 #30555880 未加载
matthews2大约 3 年前
&gt; are their contributions automatically licensed under the same MIT license as the original repository?<p>Yes. GitHub clarify this in their terms of service: <a href="https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;github&#x2F;site-policy&#x2F;github-terms-of-service#6-contributions-under-repository-license" rel="nofollow">https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;github&#x2F;site-policy&#x2F;github-terms-o...</a><p>&gt; have they (almost certainly inadvertently) assigned copyright over their changes to me? (They&#x27;re asking me to merge changes from a repository which contains a copyright declaration in my name.)<p>No. They still own the copyright to their change (unless it&#x27;s a trivial, un-copyrightable change).<p>It&#x27;s not uncommon to require contributors to reassign copyright.
评论 #30553647 未加载
bregma大约 3 年前
(1) If you accept their contributions and distribute your project under the MIT license, your project is distributed under the MIT license.<p>(2) There is no implicit copyright assignment. The author of the change retains copyright in that code, and you retain copyright in your code. You may want to look in to copyright license agreements in which you get your contributors to agree to allow you to use their code in your project and maybe agree not to revoke that permission.<p>Boilerplate headers have no real legal standing: copyright applies the minute you type the text of the source code and is only worth what you can prove in a court of law. Should you wish to change the distribution licensing at some point in the future, you will need to secure the permission of all copyright holders. In the absence of copyright assignment or copyright license agreements that means everyone who has ever contributed a line of code.
评论 #30557294 未加载
评论 #30553902 未加载
ageitgey大约 3 年前
In the US, you automatically have copyright over code you create yourself (assuming there&#x27;s &#x27;authorship&#x27; to make it something deserving of copyright). Sending someone a PR doesn&#x27;t mean you lose your copyright. You end up in a murky area where the norms of OSS are that your contribution is now part of the package, but they don&#x27;t have clear ownership over the copyright of all the code in the repo.<p>This is exactly why most big companies require new contributors to sign a copyright assignment before any of their PRs can be merged. Gray areas don&#x27;t work when lots of money is at stake.
评论 #30566596 未加载
评论 #30554179 未加载
pcthrowaway大约 3 年前
Other people have already answered your questions, and I agree with them:<p>(1): probably, but not necessarily; they could choose a different license for their contributions, though it would be unlikely to get merged<p>(2): no, they still have copyright on their changes unless they reassign it<p>But if the repo was GPL then their contributions <i>would</i> automatically be GPL also
评论 #30555813 未加载
brudgers大约 3 年前
My standard answer: if it matters, hire a lawyer and if it doesn&#x27;t matter, it doesn&#x27;t matter.<p>However, I believe this is exactly the scenario the GPL and Apache address. The GPL by copyleft and Apache by contributor agreements.<p>Neither is a free lunch. Then again neither are lawyers.
gls2ro大约 3 年前
I think you should look at Apache License that is explicitly talking about contributions.
jitendrac大约 3 年前
Add contributor.md file and put the criterias for a suitable pull request there.
charcircuit大约 3 年前
(1) Not necessarily. The other person may license it under multiple licenses or even under a proprietary one.<p>(2) No, unless they have stated that they have transferred ownership to you they own the copyright of their changes.
Jach大约 3 年前
IANAL and I don&#x27;t have much of value to add to what&#x27;s already been said, just some rambling thoughts... First I want to reiterate that broad sentiments somewhat resembling &quot;can&#x27;t we just get along and get on with real work&quot; underpins so much, both in open source and proprietary software, run directly by the user or via server proxy. Take just the question of Stack Overflow. There is a ton of code out there (open source and proprietary) that is directly copied from (or sometimes &quot;inspired by&quot;, perhaps with a language change or trivial variable renames) SO posts. This is not really legally allowed except in limited circumstances (see <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;legal&#x2F;terms-of-service#licensing" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;legal&#x2F;terms-of-service#licensing</a>) yet it&#x27;s done anyway, even at big multi-billion&#x2F;multi-trillion dollar companies you&#x27;ve heard of. Sometimes a comment will helpfully link to the source (and it really can be helpful, even if only in the crude way of identifying it to lawyers&#x2F;linters as something to rip out, but usually more by way of providing context and discussion) yet it has all the legal significance of &quot;no copyright infringement intended&quot; on copies of videos or music on youtube. If SO had an all-seeing eye and actually went after all prohibited uses out there, it might take down the whole industry. When you add all the other sources of code people copy or reference in various ways (other fora, blogs, different countries, books, papers, code&#x2F;etc predating the 70s&#x2F;80s decisions making code copyrightable at all in the US, code that is directly mathematical in nature and not copyrightable, totally anonymous authors, and so on) it&#x27;s clear this is all built on a house of cards.<p>It may be worth thinking of &quot;the work&quot; as the code + the revision history. Historically this was done by actually embedding something like a changelog with different author information in the code itself, so that there&#x27;s version A of the work with just you and your code, and other version B of the work with you and someone else and their changes with their changes called out explicitly. With version control we don&#x27;t usually bother with such embedding because it&#x27;s part of the history, but you still have version A of the work with just you and version B with you + the other author, even if nothing in the source code itself (or the license file) indicates the presence of another author. The revision history alone is enough to establish their partial authorship and any copyright claim. And probably implicit agreement to the original license, barring any signs to the contrary, per your question 1 and github&#x27;s official doc on the matter -- adding something to your readme for a public domain project like &quot;contributions implicitly agree to relinquish their copyright and dedicate changes to the public domain&quot; seems like it&#x27;d be in the realm of weird EULA clauses that may or may not be enforceable.<p>I like the Unlicense too since I learned of it. I mean, I like the public domain and screwing thinking more about this license stuff, but I also like putting in a &quot;don&#x27;t sue me if something bad happens while using this&quot; disclaimer, and even if it&#x27;s &quot;clumsily worded&quot; as others have said when it comes to countries that don&#x27;t recognize the public domain, it seems less clumsy than some of my prior attempts at &quot;this is public domain or MIT if your country doesn&#x27;t recognize such a thing&quot;. The CC0 is also acceptable as public-domain-unless-your-country-sucks-then-as-close-as-possible, even if it&#x27;s not exactly meant for software. In a recent Unlicensed library of mine that I think has a slightly-greater-than-epsilon chance of ever seeing a pull request someday, I decided in the readme to call out a request that contributions include a blurb explicitly relinquishing to the public domain (Unlicense&#x27;s site itself has a copy-pasteable blurb) since technically in the US where I am it shouldn&#x27;t really serve as a &#x27;license&#x27; and thus the license-in=license-out standard for other things doesn&#x27;t quite apply. So I&#x27;d ask a PR that didn&#x27;t include it to comment with it before merging, or if there&#x27;s disagreement either convince me to release a new version of &quot;the work&quot; with a real license, or refactor their change as an external library dependency. Still, house of cards.<p>youtube-dl is maybe the biggest Unlicensed project and solves this with a pull request template that includes a checkbox they ask contributors to check (see randomly <a href="https:&#x2F;&#x2F;github.com&#x2F;ytdl-org&#x2F;youtube-dl&#x2F;pull&#x2F;30690" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ytdl-org&#x2F;youtube-dl&#x2F;pull&#x2F;30690</a>) and this is probably a good model to follow if you expect a lot of contributions. (youtube-dl has 768, its better fork yt-dlp is at 925.) On the other hand, sqlite is just released straight into the public domain, not even with a &quot;no warranty don&#x27;t sue me&quot; clause, and is used worldwide by countless things. There are other widely used purely public domain projects too. All of our fretting with trying to pin down more legally certain edge cases with these alternate &#x27;licenses&#x27; and agreements and so on is probably just a big waste of time.<p>For important software to yourself or one&#x27;s company or contributor group (financial, social credit, control (including possibly control to relicense&#x2F;dual license everything in the future), belief in weaponizing copyright to forbid taking away the 4 freedoms via the GPL) I&#x27;m basically in agreement with others about minimizing legal risk and just going with something popular and not &quot;crayon&quot; and to consider getting CLAs, it can legitimately not be a waste of time to think about all this. Though for other cases I also think it&#x27;s important to remember how fragile this house of cards is, and weird &#x27;licenses&#x27; like WTFPL or extra clauses like &quot;prohibited to use this for evil&quot; or &quot;prohibited to use this if your name is [person I don&#x27;t like]&quot; or even a more normalized weird in the AGPL&#x27;s &quot;prohibited to have users using this by server proxy and not share your changes&quot; all serve as a reminder as well as in some cases injecting a bit of light-hearted &quot;don&#x27;t be so serious, let&#x27;s try to play nice&quot; sentiment into the matter which is important long-term for any common culture among those calling themselves programmers.