Hi All,
I'm in the process of moving source from 1 repo to a new one and we would like to have an email set when certain source files have been modified within a limited number of paths. I have successfully used the Post Hook email ScriptRunner feature to do this. IE
refChanges.any {
(pathsMatch('glob:Source/path1/**') ||
pathsMatch('glob:Source/path2/**'))
}
What we would really like, however, is to apply these same conditions on PR's that get merged to our develop branch. I have tried numerous combinations of "conditions" with various events including the "PullRequestMergedEvent" and this event never seems to fire. I should mention that all PR's are created and merged within BitBucket.
I initially tried something simple like:
pathsMatch("glob:Source/path1/**", event.pullRequest.getCommits())
or even...
event.pullRequest.pathsMatch("glob:path1/**")
When none of these worked, I even tried something more basic:
event.pullRequest.toRef.id.startsWith("refs/heads/develop")
We also tried changing the merge strategy just to see if that might be the issue but that didn't seem to matter either. For the record, we're using the "Merge commit--no-ff" merge strategy as our default. Ultimately, it seems that any attempt to send an email due to PR events isn't working.
Am I doing something wrong?
Thanks!
Scott
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.