I have 2 tests running in CodeBuild which reports back status to the commit history.
- Test 1: triggered by PR Update event. Failed because of not following my PR code standard
- Test 2: triggered by PUSH event on git branch. Succeeded, dev are free to work on their branch.
After Test 1
fails, the PR supposes to show failed status until a new commit. But the problem is Test 2
succeeded and overwrite status check on the Github pull request page. I want to let PR having green status only when both tests passed.
I checked Github official document for Commit Status:
Statuses cannot be changed once added to a commit (they’re completely immutable), but any number of statuses may be attached to a single commit. We only display the most recent status for any given commit in our UI.
But I don't know how to enable it in my case. How to make Github status check on commit immutable?
question from:https://stackoverflow.com/questions/65921158/how-to-make-github-status-checks-on-a-commit-immutable