Clarification of push vs pull_request


I was recently surprised by some behaviour by Actions in a pull request and wanted to clarify if the behaviour I observed is by-design or a bug. The screenshots attached are from a demo repo I made: Create file.txt by aidansteele · Pull Request #1 · aidansteele/github-workflow-changed-file-demo · GitHub.

I have a workflow that looks like this:

      - file.txt
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      - run: exit 1

I open up a PR with a handful of changes, including a change to file.txt. The PR has one failing check (as expected) as seen in this screenshot:

I then push a second commit to that PR, but this time the commit doesn’t include changes to file.txt, I changed some other file. I was surprised to see that the previously failed check disappears from the list of checks on this PR and now the PR’s status is all green, as seen in this screenshot:

I feel that this behaviour is confusing. I understand why the workflow didn’t execute for the second commit (as the push didn’t affect file.txt) but the inclusion/exclusion of the check in the UI feels inconsistent. It should either:

  1. Only show check statuses for pull_request workflows.
  2. Show the most recent check status for each push event associated with this PR.

But right now the behaviour is a confusing third option: show pull_request statuses and any push statuses associated with the very last commit.

Is my confusion understandable? Is this by design? Or a bug in the UI?


I subscribed to this thread because I hope to see what the official reply to this is.

I admit it took me several readings (and a visit to your repo) until I fully understood the point. But I don’t think you worded it poorly! It’s just a complex set of things configured on your PR.

I agree with you that it seems like a push check status should either always show up on a PR or never show up. However, the subtlety here is that the push check sometimes does not run at all (based on filtering by file paths). But I think that could be remedied by:

  • Always show the push check status of the branch-head (latest) commit of the PR, and…
  • Add a new status such as “not applicable” or “not a filter-match; did not run”

Then your second screenshot would show “All applicable checks have passed”, with the added detail that “1 N/A check and 1 passing check”.

1 Like