Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 5

duplicate checks on pull_request event

I tried to create an action to check WIP status by watching PR title/label changes, but my implementation generates duplicate checks on every pull_request event.

Is there any way to avoid duplicate checks?

スクリーンショット 2019-09-28 16.51.45.png

4 Replies
GitHub Staff
Message 2 of 5

Re: duplicate checks on pull_request event

Can you provide your workflow description?  That will help understand what the triggers should be executing.

Copilot Lvl 2
Message 3 of 5

Re: duplicate checks on pull_request event

My implementation simply checks the PR title and label changes on pull_request event, then return exit code if these changes contain 'WIP' string.


Here's my workflow file:

name: WIP

    types: [labeled,unlabeled,opened,edited,reopened,synchronize]


    runs-on: ubuntu-latest
    - name: WIP
      uses: mjhd-devlion/wip-kun-action@master
        token: ${{ secrets.GITHUB_TOKEN }}
        owner: mjhd-devlion
        repo: wip-kun-action
        label: 'work-in-progress'
        title: 'WIP: '
        commits: 'wip,fixup!'

Copilot Lvl 3
Message 4 of 5

Re: duplicate checks on pull_request event

Looks like my previous comment somehow disappeared.


I have the same issue where duplicate checks are generated. This becomes a big issue when using "Require status checks to pass before merging" on an action where this can happen. Let's say you have an action which is triggered by the following:


types: [opened, reopened, edited, closed]


The action that is run validates the title of a Pull Request. When first opening the Pull Request the action is fired on the "opened" event and then fails that action because the title was wrong. The user now edits the Pull Request title and the action is rerun but this time with the "edited" event. This time the title was correct and the action succeeds. We now have two status checks on that Pull Request. One failed and one succeeded.


Since they are not grouped together it's now impossible to merge this PR due to the "Require status checks to pass before merging" check still seeing the check that was trigged on "opened" as failed.


I think that these checks should be grouped by the actual job that is selected under "Require status checks to pass before merging" and use the latest ran to set the check as successful or not.

Copilot Lvl 2
Message 5 of 5

Re: duplicate checks on pull_request event

I'm having the same issue.


I was able to work around it by writing my own action and having it send status checks through the API, then making that status check required - but not the actions themselves. This way the actions always succeed - but there will only ever be one status check that matters (gets overwritten every time title changes, for instance).


It seems like there should be a better way though. Either we should be able to de-clutter the "checks" to hide actions that are duplicated, or won't fail - or there should be a way of grouping them all under a single "check" in the interface obviating the need for and explicit status check call.


Screen Shot 2019-10-17 at 10.54.12 AM.png