Same Github Action shows up as two separate checks

I have created a GitHub action for my my team which checks to make sure that a core member of the team has approved a pull request. For the sake of this discussion please ignore that Github has some built-in features for accomplishing similar functionality; they just don’t quite work for our use case.

Originally I used the following trigger:

on:
  pull_request_review:
    types: [submitted, edited, dismissed]

This works fine, except for when team members merge the master branch into their branch. The action of merging the master branch into their feature branch dismisses the passing check from this action and because merging isn’t a trigger for the action it doesn’t re-run and requires someone on the core team to re-approve the pull request in order to make the action pass again.

In order to solve this problem I tried adding another type of trigger to the action:

on:
  pull_request_review:
    types: [submitted, edited, dismissed]
  pull_request:
    types: [synchronize]

Now the action shows up twice in the list of required checks. This results in a new problem where the pull_request synchronize will pass when master is merged, but the pull_request_review check will still not be passed.

What can I do to have this action only show up one time on the pull request with two triggers?

1 Like