jenkinsci / jenkinsci/generic-webhook-trigger-plugin

Arbitrary script as a filter

Open
#258 10 comments 5 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
427
Forks
169
Avg merge
23m
Merged PRs (30d)
1

Description

The regexp based filter is very powerful and can be used to accomplish almost anything, but as soon as you have any kind of complexity in terms of events you want to handle, it can very quickly become unmaintainable.

For example we have a use case to trigger the same job from the following:

- PR opened against repo A
- PR merged in repo A
- `main` branch updated in repo B
- A comment on a PR in repo A or repo B
- PR title updated in repo A

All of a sudden you find yourself with a regexp like `^(case 1)|(case 2)|(case 3)...$` where each case has to list out all the contributing variables (with a `.*` at times).

It would be handy to be able to pass in a simple script as a filter instead.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.