Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Actions, duplicate check for different trigger events

My GitHub Actions workflow gets triggered during these two specified events - when the PR title gets edited and when a code-reviewer submits a review:

on:
  pull_request:
    types: [edited]
    branches:
    - master
  pull_request_review:
    types: [submitted]
    branches:
    - master

Assuming I accept the code changes for the PR, the workflow runs with event: pull_request_review

enter image description here

Then, I change the PR title. The same workflow runs but a new status check is added for event: pull_request Now, there are two status checks for the same workflow.

enter image description here

Is there a way to have only one status check for both events?

like image 366
naregkar Avatar asked Aug 14 '26 09:08

naregkar


1 Answers

I had to create a workaround to resolve this issue since I need one check to allow developers to merge their PRs when a dynamic custom approvers do approve the PR (pull_request_review event ), so I created a custom github action to RERUN the given list of checks by their job names

https://github.com/marketplace/actions/rerun-checks

name: After Review Trigger

on:
  pull_request_review:
    types: [ submitted ]

jobs:
  afrer-review-trigger:
    name: After Review Trigger
    runs-on: ubuntu-latest
    steps:
      - name: Rerun protected-topics and Kafka-config-validation checks
        uses: shqear93/rerun-checks@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          check-names: 'protected-topics, some-other-job-name'
like image 59
Khaled AbuShqear Avatar answered Aug 18 '26 22:08

Khaled AbuShqear



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!