Fix trymerge broken trunk detection when the merge base job was retried (successfully) (#107333)
This fixes a discrepancy bug between Dr.CI and trymerge when detecting broken trunk failures.
Take https://github.com/pytorch/pytorch/pull/107160 as an example:
* Dr.CI correctly identifies the broken trunk failure
* while trymerge records it as a new failure
The issue is that the merge base [failure](https://github.com/pytorch/pytorch/actions/runs/5833057579/job/15820504498) was flaky. It was retried successfully and its conclusion went from a failure to a success. The Rockset query returns all run attempts and while Dr.CI correctly records the failure, trymerge overwrites it with the successful retry. Thus, the latter saw a new failure.
This change makes trymerge keep the merge base failure similar to what Dr.CI does https://github.com/pytorch/test-infra/blob/main/torchci/pages/api/drci/drci.ts#L158-L168
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107333
Approved by: https://github.com/clee2000