Expose commit message and author for head commit, this allows implementation of traits based on commit (inside the plugin or as extension in other plugins).
The scenario to cover is when in the pipeline there are git commit (for example during release) and push that triggers multiple build.
In my scenario are three builds:
- one for the push of new version
- one for the push of tag (
- one for the push of next development version
We would prevent trigger new build job if commit was performed by a specific user (jenkins user) or contains a particular message (for example start with [maven-release-plugin]).
Author is retrieved but are not exposed to by the BitbucketCommit interface, the message is not correctly handled so it's always null.
After that we could add a CommitFilter(out)Traits that can exclude branches that matches some rules based on author name <email> (typical representation of commit author in git) or message.