Open Skipants opened 2 months ago
I forgot to run tests and I have a feeling they might fail on this change. I changed this to a draft PR for the time-being.
Tests pass
Sorry about the long delay. Thank you for the contribution.
@ejoffe No problem at all. Huh looks like tests fail though, even though they passed locally. I'll take a look.
Oops. I'm a little fresh to go and realized I only ran tests in spr/spr instead of doing go test ./...
🤦
Tests were failing because the fezzik type mocks returned no statusCheckRollup
. So the default value for ChecksPass
on these expected PR values were github.CheckStatusFail
. It doesn't seem like we're actually testing the status checks in these tests so seems fine to just switch them all to github.CheckStatusPass
.
@ejoffe If you'd like it done differently let me know. Otherwise I think you're good to merge this.
The Github GraphQL response returns null for the StatusCheckRollup object if there are no status checks at all. In that case, this should be a pass.
From my understanding, spr gets the state of the PullRequest with a graphql query like the following:
On the repository I am working on, this would give a response with a
statusCheckRollup: null
:This prevented me from merging PRs in the stack as the status check would always fail. This fix makes null statusCheckRollups a pass instead.
I rebuilt this executable locally and was able to move my PRs along with no issue.