Mike,

More recently, I have been using the Squash and Merge button, and then
adding Signed-off-by at the footer of the message in GitHub. That
approach provides commit signing using GitHub itself, and also
provides the sign off with the manual footer addition. GitHub includes
the PR number in the commit message title, which marks the PR as
merged.

I also squash commits and push manually, usually to the GitHub mirror,
signing commits with my own key. The Apache Git bot automatically
mirrors commits between Apache Gitbox and GitHub, so pushing to Apache
Gitbox should work just as well as pushing to GitHub. When pushing a
commit to either repository, using the "This closes #12345" line in
the commit message triggers GitHub to close the PR.

Regards,
David Handermann

On Tue, Dec 2, 2025 at 8:32 AM Michael Moser <[email protected]> wrote:
>
> Thanks for the script, Marton!  I used it recently and it's straightforward
> to use.  I still pushed to the apache.org Git, and I suspect that's why my
> signed commits don't appear as "verified".  I will change my process to
> push to github.
>
> Scott, I was wondering how well the Github merge buttons worked.  When
> using the "Squash and merge" button, can you edit the commit message to
> include "Signed-off-by" and the PR number that triggers PR's to close?
>
> Thanks again,
> -- Mike
>
>
> On Mon, Dec 1, 2025 at 10:24 AM Scott Aslan <[email protected]> wrote:
>
> > On the frontend PRs we use the "Squash and merge" button on github but have
> > git config setup to sign commits etc.
> >
> > On Fri, Nov 21, 2025 at 9:39 AM Marton Szasz <[email protected]> wrote:
> >
> > > On MiNiFi C++, I usually use this script I developed over time:
> > >
> > >
> > https://github.com/szaszm/verify-nifi-release/blob/master/bin/minificpp-merge-pr.sh
> > >
> > > On NiFi, I followed the same steps manually for my recent commit.
> > >
> > > - look up pull request by id using the github API
> > > - get the author, title and description from the pull request
> > > - rebase the PR branch to main
> > > - squash merge to main (roughly equivalent to a cherry-pick for single
> > > commits)
> > > - set author and commit message based on info from the PR
> > > - signoff, GPG sign
> > > - push to github (not git-*.apache.org)
> > >
> > > Marton
> > >
> > > On 11/21/25 3:26 PM, Michael Moser wrote:
> > > > I'm writing to ask NiFi committers about their current best practice
> > for
> > > > committing PRs to git.  What process do you use?
> > > >
> > > > I admit I use a very old command-line process to commit, based on the
> > > > Contributor Guide [1], including manual squash, cherry-pick to main,
> > push
> > > > to git-wip-us.apache.org. There has to be a better way now.
> > > >
> > > > [1] -
> > > >
> > >
> > https://cwiki.apache.org/confluence/display/NIFI/Contributor+Guide#ContributorGuide-CodeReviewProcess
> > > >
> > > > Thanks,
> > > > -- Mike
> > >
> >

Reply via email to