Works like a charm. Thanks Andrew. Before I used the rebase option instead of sqash, which doesn’t have this option.
From: Andrew Purtell <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Saturday, June 15, 2019 at 9:08 PM To: "[email protected]" <[email protected]> Subject: Re: Apologies for missing Signed-off-by Turns out you can put the signed off by lines in the commit message edit box during merge and github will add them to the squash commit. We just have to remember to do it. Ideally someday it can be auto generated by GitHub from PR metadata. Add a signed off by line for each approver. Can we configure this already? Seems like a simple enough idea for someone to have made a feature request for it before. On Jun 15, 2019, at 11:10 AM, Jan Hentschel <[email protected]<mailto:[email protected]>> wrote: I also ran into this recently for GitHub PRs. I would like to have automated sign-offs after a review. In the meantime, how should we sign-off the commits from PRs? Pulling the PR locally, signing it off and then push to the PR branch? In the end I would like to do it like Andrew did on his recent PR - https://github.com/apache/hbase/pull/308 From: "张铎(Duo Zhang)" <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Friday, May 31, 2019 at 3:25 AM To: HBase Dev List <[email protected]<mailto:[email protected]>> Subject: Re: Apologies for missing Signed-off-by I thought this should a feature for github, just add the members who approve the PR in as signed-off-by when merging the PR... Andrew Purtell <[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:[email protected]%3e>> 于2019年5月31日周五 上午7:09写道: That would be nice. On Thu, May 30, 2019 at 4:06 PM Sean Busbey <[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:[email protected]%3e>> wrote: oh! if we automated adding the github PR number in the commit message as a part smart-apply-patch then you could just push directly to the repo after your amend without going back to the PR. On Thu, May 30, 2019 at 5:55 PM Andrew Purtell <[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:[email protected]%3e>> wrote: Yes, the problem is after your PR is reviewed, you have to add Signed-off-by lines in the commit message on the PR branch before merge. I would do this like I modify local commits. git commit --amend, edit the commit message, then push. For a PR branch you have to force push to the review branch after editing the commit message to manually add Signed-off-by. I forget to do that, mainly because for me the PR workflow is new. On Thu, May 30, 2019 at 3:51 PM Sean Busbey <[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:[email protected]%3e>> wrote: These will only add your own, to be clear. also git am will take a --signoff option directly instead of needing an amend. I've brainstormed expanding smart-apply-patch to automate adding sign-offs from reviews. I don't think it ever reached the level of a jira, but if enough hbase committers find the idea useful I can put some work into it. On Thu, May 30, 2019 at 5:46 PM Sean Busbey <[email protected]<mailto:[email protected]><mailto:[email protected]><mailto:[email protected]%3e>> wrote: via plain git commands, presuming your local author metadata is correct: git commit --amend --signoff Or via apache yetus smart-apply-patch when pulling down the PR, again presuming your local author metadata is correct. any one of: smart-apply-patch --project=hbase --committer HBASE-22461 smart-apply-patch --project=hbase --plugins=github --committer 274 smart-apply-patch --project=hbase --committer https://github.com/apache/hbase/pull/274 On Thu, May 30, 2019 at 5:12 PM Andrew Purtell < [email protected]<mailto:[email protected]><mailto:[email protected]><mailto:[email protected]%3e>> wrote: The last couple of changes I've contributed by the GitHub workflow and both times I have forgotten to manually add Signed-off-by attribution in the PR before squash merging it. Will try to do better. By any chance, does anyone know of a way to add such things by the command line to a PR? Just wondering, because my (muscle) memory is driven by command line syntax. -- Best regards, Andrew Words like orphans lost among the crosstalk, meaning torn from truth's decrepit hands - A23, Crosstalk -- Best regards, Andrew Words like orphans lost among the crosstalk, meaning torn from truth's decrepit hands - A23, Crosstalk -- Best regards, Andrew Words like orphans lost among the crosstalk, meaning torn from truth's decrepit hands - A23, Crosstalk
