Re: ASF wide policy on github's squash and merge?
It looks like those co-authored by are coming indeed from the "suggestion" workflow https://github.com/apache/airflow/pull/15100#discussion_r605489162 - github adds co-authored-by automatically when you add the suggestion. If this is the case, then geems that if you want to do get the same from manually pushed commits, those co-authored-by should be added automatically (see git-mob hook). J, On Wed, Apr 7, 2021 at 12:25 PM antonio wrote: > Mmm... maybe we have a misconfiguration in our github repository or > something. > > When we try to do a squash-and-merge we don't have these > "Co-authored-By" entries added automatically (see, for instance, [1]). > > I'll try to see what is going on, and post here if I find a solution. > > Thanks and kind regards, > Antonio > > > [1] > https://pasteboard.co/JWd7Ij8u.png > > On 07/04/2021 10:00, Jarek Potiuk wrote: > > This is automatically added in some scenarios of github workflow - for > > example when you make a 'suggestion' and that suggestion is then > > "committed", the "Co-authored-by" is added automatically. > > > > I think it also works (but I am not 100% sure) when you simply push your > > commit on top of someone's branch (if you are a committer, by default you > > can do it for people's forks unless they opt-out when forking). > > - > To unsubscribe, e-mail: dev-unsubscr...@community.apache.org > For additional commands, e-mail: dev-h...@community.apache.org > > -- +48 660 796 129
Re: ASF wide policy on github's squash and merge?
Mmm... maybe we have a misconfiguration in our github repository or something. When we try to do a squash-and-merge we don't have these "Co-authored-By" entries added automatically (see, for instance, [1]). I'll try to see what is going on, and post here if I find a solution. Thanks and kind regards, Antonio [1] https://pasteboard.co/JWd7Ij8u.png On 07/04/2021 10:00, Jarek Potiuk wrote: This is automatically added in some scenarios of github workflow - for example when you make a 'suggestion' and that suggestion is then "committed", the "Co-authored-by" is added automatically. I think it also works (but I am not 100% sure) when you simply push your commit on top of someone's branch (if you are a committer, by default you can do it for people's forks unless they opt-out when forking). - To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For additional commands, e-mail: dev-h...@community.apache.org
Re: ASF wide policy on github's squash and merge?
This is automatically added in some scenarios of github workflow - for example when you make a 'suggestion' and that suggestion is then "committed", the "Co-authored-by" is added automatically. I think it also works (but I am not 100% sure) when you simply push your commit on top of someone's branch (if you are a committer, by default you can do it for people's forks unless they opt-out when forking). And the co-authored-by is a standard. It is part of the commit message so various squash/fixups etc. might remove that (fixup by default removes the squashed commit's message). So you might lose it when you further rebase/squash it. But adding the tag to your commit is easy and can even be done automatically (https://github.com/findmypast-oss/git-mob) J. On Wed, Apr 7, 2021 at 8:53 AM antonio wrote: > Hi Jarek, > > This is exactly what we need! > > Question is, are you adding the "Co-authored-by:" line by hand or is it > automatically generated whenever a Pull Request is created in Github? It > would be great if we could have this populated automatically for an > easier review. > > Maybe there're some settings you your repo's ".github" folder that we're > missing. I'll try to investigate this. > > Thanks, > ANtonio > > > El 7/4/21 a las 0:37, Jarek Potiuk escribió: > > Not sure how your workflow is, but In Apache Airflow we use squash & > merge > > exclusively and `co-autorship` is pretty common. > > For example, when I try to squash and merge this PR: > > https://github.com/apache/airflow/pull/15100, I get this: > > https://pasteboard.co/JW8pJnQ.png - after we merge it, this commit will > > have 3 authors. > > > > For reference I show the auto-generated text commit message at the end of > > the email. `Co-authored-by:` is the way how attribution works. You can > > also manually modify such a squashed commit message before you merge it. > > - > To unsubscribe, e-mail: dev-unsubscr...@community.apache.org > For additional commands, e-mail: dev-h...@community.apache.org > > -- +48 660 796 129
Re: ASF wide policy on github's squash and merge?
Hi Jarek, This is exactly what we need! Question is, are you adding the "Co-authored-by:" line by hand or is it automatically generated whenever a Pull Request is created in Github? It would be great if we could have this populated automatically for an easier review. Maybe there're some settings you your repo's ".github" folder that we're missing. I'll try to investigate this. Thanks, ANtonio El 7/4/21 a las 0:37, Jarek Potiuk escribió: Not sure how your workflow is, but In Apache Airflow we use squash & merge exclusively and `co-autorship` is pretty common. For example, when I try to squash and merge this PR: https://github.com/apache/airflow/pull/15100, I get this: https://pasteboard.co/JW8pJnQ.png - after we merge it, this commit will have 3 authors. For reference I show the auto-generated text commit message at the end of the email. `Co-authored-by:` is the way how attribution works. You can also manually modify such a squashed commit message before you merge it. - To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For additional commands, e-mail: dev-h...@community.apache.org
Re: ASF wide policy on github's squash and merge?
пн, 5 апр. 2021 г. в 23:02, antonio : > > Hi all, > > First of all, apologies if this is not the proper list to ask these sort > of questions. If this is the case I'd appreciate some guidance on who to > ask these questions. > > It seems github automatically changes author [1] and contributor [2] > details when one presses the "Squash and Merge" button, replacing these > with the author name and email (if present) of the Github account (and > with "GitHub nore...@github.com" otherwise). > > We discussed this in our mailing list a while back ([4], [5]) with no > clear consensus. > > The questions are: > > 1. Is there an ASF-wide policy (or consensus) on how to handle this > "Squash & Merge" feature in github? Or is this a project-specific decision? > > 2. Does the ASF want to keep track of contributor names/emails when PRs > are received+squashed+merged via github or is this Github behaviour ok? Historically, Git is not the first source code management or version control software used at the ASF. It was preceded by Subversion (now Apache Subversion), and earlier by CVS. In those times contributions were proposed as patch files, and there was no such problem that you are facing now. As such, many projects have a separate place where contributions are credited: a changelog file. There is also a custom to provide credit in a commit message (e.g. "patch provided by ...") Using "squash" is essentially equivalent to committing a patch file. In general, a contribution is a collaborative effort both of the original author of the change and of reviewers from the community. The author is not the only one responsible here. (As an example, in Apache Tomcat we do not allow @author tags in contributions.) Also, in general the contributions should be traceable via mailing lists archives. ("If it did not happen on a mailing list, it did not happen." [1]) [1] https://community.apache.org/newbiefaq.html#is-there-a-code-of-conduct-for-apache-projects Thus, > 1. Is there an ASF-wide policy (or consensus) on how to handle this > "Squash & Merge" feature in github? Or is this a project-specific decision? A project-specific decision. A PMC is the one responsible for managing a project. > 2. Does the ASF want to keep track of contributor names/emails when PRs > are received+squashed+merged via github That is not the only way to track a contribution. > or is this Github behaviour ok? If you are allowed to edit the commit message and thus credit the original author then it is OK. If not, then it is broken. Generally, it is possible to rewrite a project's history ("git commit --amend" to edit a commit message, followed by a forced push). It has consequences, it is frowned upon, but it is technically possible. It is also possible to create an empty commit (containing only a commit message and no code changes) if you want to add something to a project history. HTH. Best regards, Konstantin Kolinko, a committer and PMC member in Apache Tomcat and Apache Gump. - To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For additional commands, e-mail: dev-h...@community.apache.org
Re: ASF wide policy on github's squash and merge?
Hi, Yes, this question is very good :) For Apache APISIX, we usually use Squash instead of Merge, because our PRs may have a long commit log, and some commit messages are not useful actually, so we choose to use Squash only for now. Craig Russell 于2021年4月6日 周二上午7:26写道: > Hi Antonio, > > > On Apr 5, 2021, at 1:01 PM, antonio wrote: > > > > Hi all, > > > > First of all, apologies if this is not the proper list to ask these sort > of questions. If this is the case I'd appreciate some guidance on who to > ask these questions. > > IMHO this is a fine place to discuss this topic. > > > It seems github automatically changes author [1] and contributor [2] > details when one presses the "Squash and Merge" button, replacing these > with the author name and email (if present) of the Github account (and with > "GitHub nore...@github.com" otherwise). > > > > We discussed this in our mailing list a while back ([4], [5]) with no > clear consensus. > > > > The questions are: > > > > 1. Is there an ASF-wide policy (or consensus) on how to handle this > "Squash & Merge" feature in github? Or is this a project-specific decision? > > I believe this is a project-specific decision to make. Some projects > (Netbeans) are discussing disabling the feature in order to preserve > contributors for patches. > > But other projects (JDO) discussed this and agreed that the default should > be squash and merge because if a patch has many iterations, the commit > history gets very messy and it's hard to trace the progress of the patch as > it wanders through several stages. > > > > 2. Does the ASF want to keep track of contributor names/emails when PRs > are received+squashed+merged via github or is this Github behaviour ok? > > I would just caution projects to carefully consider the possibility of > losing provenance if using squash-merge protocols, especially if > contributions are being merged from non-committers. > > Regards, > Craig > > > > Thanks for any guidance, > > Antonio > > > > > > [1] > > Pull request "Squash and merge" button changes author details #1368 > > https://github.com/isaacs/github/issues/1368 > > > > [2] > > Contributors of squashed commits don't get any love #1303 > > https://github.com/isaacs/github/issues/1303 > > > > [3] > > Merging on github (aka Squash and Merge is broken) > > > http://mail-archives.apache.org/mod_mbox/netbeans-dev/201912.mbox/%3C6157b71ba7974359a3d1b9ae83bbb4a0ea2c9b2d.camel%40doppel-helix.eu%3E > > > > [4] > > [DISCUSS] github: Disable squash-and-merge button > > > http://mail-archives.apache.org/mod_mbox/netbeans-dev/202005.mbox/%3C76c36442eb90d3b4c6bfe76c51127549d05bc34e.camel%40doppel-helix.eu%3E > > > > - > > To unsubscribe, e-mail: dev-unsubscr...@community.apache.org > > For additional commands, e-mail: dev-h...@community.apache.org > > > > Craig L Russell > c...@apache.org > > > - > To unsubscribe, e-mail: dev-unsubscr...@community.apache.org > For additional commands, e-mail: dev-h...@community.apache.org > > -- 来自 琚致远
Re: ASF wide policy on github's squash and merge?
Hi Antonio, > On Apr 5, 2021, at 1:01 PM, antonio wrote: > > Hi all, > > First of all, apologies if this is not the proper list to ask these sort of > questions. If this is the case I'd appreciate some guidance on who to ask > these questions. IMHO this is a fine place to discuss this topic. > It seems github automatically changes author [1] and contributor [2] details > when one presses the "Squash and Merge" button, replacing these with the > author name and email (if present) of the Github account (and with "GitHub > nore...@github.com" otherwise). > > We discussed this in our mailing list a while back ([4], [5]) with no clear > consensus. > > The questions are: > > 1. Is there an ASF-wide policy (or consensus) on how to handle this "Squash & > Merge" feature in github? Or is this a project-specific decision? I believe this is a project-specific decision to make. Some projects (Netbeans) are discussing disabling the feature in order to preserve contributors for patches. But other projects (JDO) discussed this and agreed that the default should be squash and merge because if a patch has many iterations, the commit history gets very messy and it's hard to trace the progress of the patch as it wanders through several stages. > > 2. Does the ASF want to keep track of contributor names/emails when PRs are > received+squashed+merged via github or is this Github behaviour ok? I would just caution projects to carefully consider the possibility of losing provenance if using squash-merge protocols, especially if contributions are being merged from non-committers. Regards, Craig > > Thanks for any guidance, > Antonio > > > [1] > Pull request "Squash and merge" button changes author details #1368 > https://github.com/isaacs/github/issues/1368 > > [2] > Contributors of squashed commits don't get any love #1303 > https://github.com/isaacs/github/issues/1303 > > [3] > Merging on github (aka Squash and Merge is broken) > http://mail-archives.apache.org/mod_mbox/netbeans-dev/201912.mbox/%3C6157b71ba7974359a3d1b9ae83bbb4a0ea2c9b2d.camel%40doppel-helix.eu%3E > > [4] > [DISCUSS] github: Disable squash-and-merge button > http://mail-archives.apache.org/mod_mbox/netbeans-dev/202005.mbox/%3C76c36442eb90d3b4c6bfe76c51127549d05bc34e.camel%40doppel-helix.eu%3E > > - > To unsubscribe, e-mail: dev-unsubscr...@community.apache.org > For additional commands, e-mail: dev-h...@community.apache.org > Craig L Russell c...@apache.org - To unsubscribe, e-mail: dev-unsubscr...@community.apache.org For additional commands, e-mail: dev-h...@community.apache.org