Thanks Daniel, This could indeed be useful. The project already has a template for the commit message (see https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+commit+message+template), which is currently used by all committers.
Working through/via Git (and pull requests via Github) indicates that all contributors (authors) apply this template to get the commit message properly formatted. Best regards, Pierre Smits *Apache Trafodion <https://trafodion.apache.org>, Vice President* *Apache Directory <https://directory.apache.org>, PMC Member* Apache Incubator <https://incubator.apache.org>, committer *Apache OFBiz <https://ofbiz.apache.org>, contributor (without privileges) since 2008* Apache Steve <https://steve.apache.org>, committer On Thu, Jan 30, 2020 at 3:03 PM Daniel Watford <d...@foomoo.co.uk> wrote: > Hello Pierre, > > Its not something I've worked with before, but git commit message templates > might help here. > > From a quick scan of the git documentation it seems that the > config.template configuration item can be used to specify a file to use as > a template. ( > https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration) > > This could be augmented with a git pre-commit hook to examine the commit > message to ensure it is considered valid. ( > https://git-scm.com/docs/githooks > ) > The hooks are bash scripts, so there might be some issues with > compatibility on windows. > > The problem with above approaches is that they are controlled by the > environment's configuration rather than the content of the repository. > There might be a solution based around having gradle set configure.message > on .git/config and copy the pre-commit hook to .git/hooks/, but that might > be considered poor practice to have build scripts changing the developer's > environment. > > Github PR templates might be of interest - > > https://help.github.com/en/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository > > Thanks, > > Dan. > > On Thu, 30 Jan 2020 at 13:25, Pierre Smits <pierresm...@apache.org> wrote: > > > Hi All, > > > > Recently we saw some postings in various threads how to deal with commits > > from contributors coming via pull requests in Github. > > If I understand it correctly, the issue we're dealing with has to do with > > the commit message (as defined in > > > > > https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+commit+message+template > > ). > > After a code contribution has been accepted by a committer, this commit > > message appears in: > > > > 1. the OFBiz repo > > 2. a posting to the commit@ mailing list > > 3. in the referenced JIRA ticket (as a comment, and in the commit > > section, see e.g. https://issues.apache.org/jira/browse/OFBIZ-10954) > > > > Elements of the commit message are also used in the regularly occurring > > blog posts of the project. > > > > With our repositories available via Github, we can expect that more and > > more contributors work within their local clones, and publish their code > > changes (commits) in their own public forks on Github and from there > issue > > a pull request to get these contributions evaluated by community members > > and when good incorporated into the OFBiz repositories. > > > > A pull request can contain one or more commits (from the contributor - or > > in git parlance: the author). > > > > So, when the commit message by the contributor (author) of each of his > > commits is formatted in accordance with the commit-message template there > > is nothing that stands in the way to take it to the next step. Which is > the > > evaluation of the contribution by other community members. > > > > Is my assessment so far correct? > > > > Best regards, > > > > Pierre Smits > > > > *Apache Trafodion <https://trafodion.apache.org>, Vice President* > > *Apache Directory <https://directory.apache.org>, PMC Member* > > Apache Incubator <https://incubator.apache.org>, committer > > *Apache OFBiz <https://ofbiz.apache.org>, contributor (without > privileges) > > since 2008* > > Apache Steve <https://steve.apache.org>, committer > > > > > -- > Daniel Watford >