Skip to content

Don't set status if existing status is the same#78

Merged
wjt merged 1 commit intomainfrom
wjt/push-vlxxxuyxmvpn
Dec 15, 2025
Merged

Don't set status if existing status is the same#78
wjt merged 1 commit intomainfrom
wjt/push-vlxxxuyxmvpn

Conversation

@wjt
Copy link
Member

@wjt wjt commented Dec 15, 2025

Previously we would unconditionally set a new status for each commit each time the job runs.

https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#create-a-commit-status says:

Note: there is a limit of 1000 statuses per sha and context within a
repository. Attempts to create more than 1000 statuses will result in
a validation error.

We appear to be hitting this limit for a very long-lived PR in Threadbare.

Check the combined status for the commit, which includes the latest status for each context. Update the status only if there is no existing status for our context, or if the existing status does not match. (For instance, the URL may have changed.)

Resolves #77

Previously we would unconditionally set a new status for each commit
each time the job runs.

https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#create-a-commit-status says:

> Note: there is a limit of 1000 statuses per sha and context within a
> repository. Attempts to create more than 1000 statuses will result in
> a validation error.

We appear to be hitting this limit for a very long-lived PR in
Threadbare.

Check the combined status for the commit, which includes the latest
status for each context. Update the status only if there is no existing
status for our context, or if the existing status does not match. (For
instance, the URL may have changed.)

Resolves #77
@wjt
Copy link
Member Author

wjt commented Dec 15, 2025

I'll merge this without review because this is causing an error email for every update to any Threadbare branch.

@wjt wjt merged commit c90c366 into main Dec 15, 2025
1 check passed
@wjt wjt deleted the wjt/push-vlxxxuyxmvpn branch December 15, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting commit status fails with HTTP error 422

1 participant

Comments