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:
on: push: paths: - file.txt jobs: build: runs-on: ubuntu-latest steps: - 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:
- Only show check statuses for
- Show the most recent check status for each
pushevent 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?