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

Un-enforcing status check doesn't work as expected #24

Closed
alexandresavicki opened this issue Jan 20, 2021 · 2 comments · Fixed by #30
Closed

Un-enforcing status check doesn't work as expected #24

alexandresavicki opened this issue Jan 20, 2021 · 2 comments · Fixed by #30
Labels
bug Something isn't working

Comments

@alexandresavicki
Copy link

Hi @SvanBoxel great job on this APP.

I found an possible bug when i configure enforce: true and enforce_admin: true, at this point everything works like a charm.
But when i try to set enforce: false and enforce_admin: false after the workflow already created checks on protection branchs it keeps as true for all repositoryes in my organization.

It would be great if, after the change forces it to false, it is updated checks for all repositoires.

@SvanBoxel
Copy link
Owner

Bug confirmed. 👍🏽

At the moment the app copies all current required status checks as an array and then, depending on whether you enforce it or not, adds a new required check to that array. That means that even though you toggle the boolean from true to false, it will still be part of the original array of required checks.

Culprit:

contexts: [...(protection ? protection.data.required_status_checks.contexts : []), context_name]

@SvanBoxel SvanBoxel added the bug Something isn't working label Jan 21, 2021
@SvanBoxel SvanBoxel changed the title Update Enforce checks Un-enforcing status check doesn't work as expected Jan 21, 2021
@SvanBoxel
Copy link
Owner

Release with 1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants