Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

PR event not firing

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

1 answer

@scott parillo did you ever figure it out? I am in the same predicament right now

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

How to log work and track time in Jira when a person is part of multiple teams

  The manager’s daily activities include a list of challenges to reach high levels of efficiency for their teams. Part of these challenges is related to how to deal with the worklog systems sin...

85 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you