Trigger: build only if a merge into master is detected

Dear forum,

in the trigger configuration we use a quiet period of “0”, so a build is triggered for every commit. We would like to run only one build per merge commit (from feature branch to master). Currently, if a merge contains many commits, we get many pending builds - one per commit, which is more than needed.

There is a “comment pattern” input field in the trigger configuration options. If the build is triggered only when a merge commit message contains the word “merge”, this should help reduce the number of builds. Is this correct?

Kind regards
Michael

Hi Michael,

Assuming this is a git repository, there is an option on the Branch tab of the trigger dialog labelled “Skip commits previously built for this configuration”. This prevents a more that one build triggering for the changesets with the same commit hash on different branches. Does this work for your scenario?

Yes, if you enter the word “merge” into the Include field on the Comments tab of the trigger dialog, then a build is only triggered if the commit message contains the word “merge”.