We have a Github Org folder with Multibranch all using Declarative Pipelines. Forked repo PR’s send Github webhooks and builds happen just fine. When the PR is approved and merged/closed, our groovy shared lib sniffs out that’s it’s a merge to the main branch and does a release build with gradle-release. That Gradle plugin changes a version number file and does a commit/push to the origin. This then triggers a webhook and a second useless build.
I have shared library code to detect this and abandon the build, but I’d really rather just ignore the event altogether.
I’ve tried using GitHub Commit Skip SCM Behaviour with author and commit message and nothing seems to work. I suspect that processing of webhooks do not honor filters in the same way as scanning/discovery?
Secondarily, am I correct that github-branch-source-plugin
is creating/managing the creation of those webhooks, or did a just dream that up?
Ultimately, how do I filter out builds triggered from webhooks from even starting up based on being CI/CD pushes to the origin controller branch?
Jenkins 2.401.2
github-branch-source 1771.v59b_6a_fa_1b_89e
github-scm-trait-commit-skip 0.4.0
github api 1.318-461.v7a_c09c9fa_d63
Pipeline: Multibranch 770.v1a_d0708dd1f6