Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't clear required status checks #7

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

LucianBuzzo
Copy link

This fixes an issue where the checks required for a PR to be merged is set to an empty array. See https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28#update-branch-protection

This fixes an issue where the checks required for a PR to be merged is set to an empty array.
See https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28#update-branch-protection
@sebmellen sebmellen merged commit 342c6c5 into main Jun 2, 2023
@sebmellen sebmellen deleted the lucianbuzzo/fix-empty-required-checks branch June 2, 2023 14:07
LucianBuzzo added a commit that referenced this pull request Jun 15, 2023
In my previous PR for this
(#7)
I removed the checks value, however this results in an error when
querying the GitHub API ("checks" is required). My updated approach is to first retrieve the
existing set of checks on the repo, then when I update the branch
protection rules, keep the checks the same. I've tested this with the
cortex-api repo and it works as expected.

Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
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.

None yet

2 participants