jenkinsci / poll-mailbox-trigger-plugin

A Jenkins plugin, to poll an email inbox, and trigger jobs based on new emails.
https://plugins.jenkins.io/poll-mailbox-trigger-plugin/
MIT License
41 stars 32 forks source link

Request to filter subject on 'not contains' #23

Open espguitarist33 opened 7 years ago

espguitarist33 commented 7 years ago

I may also have missed something, but I did breeze through the source where the subjectContains gets used and it looks like there is no way to filter on emails not containing a specific string or value.

Is this something that could be implemented?

For example: I need launch a project based on the receipt of an email. Where the initial project getting launched depends on the subject of the email.

The following two will work correctly (different starting project for each)

However this will not work for me:

It would be easy (easier than a possible hack alternative or two) to exclude 'v100 custom' from the v100 project by simply saying if subjectContains=v100 and subjectNotContains=custom.

Thanks! Ryan

nickgrealy commented 6 years ago

Note to self: shouldn't be too hard to do.

Use: https://github.com/jenkinsci/poll-mailbox-trigger-plugin/blob/master/src/main/groovy/org/jenkinsci/plugins/pollmailboxtrigger/mail/utils/SearchTermHelpers.java#L35

Here: https://github.com/jenkinsci/poll-mailbox-trigger-plugin/blob/master/src/main/groovy/org/jenkinsci/plugins/pollmailboxtrigger/PollMailboxTrigger.java#L263

vijaychandra24 commented 6 years ago

Does this implemented ? do regular expression works in SubjectContains? anybody have clue

espguitarist33 commented 6 years ago

Did this ever get implemented? We have a further increasing need for this feature