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

CLI minder repo delete fails when access to github repository is revoked #3518

Open
blkt opened this issue Jun 4, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@blkt
Copy link
Contributor

blkt commented Jun 4, 2024

Describe the issue

An admin can pick which repositories are accessible to Minder during and after enrollment via github.
When a repository originally accessible to Minder gets removed from the list of accessible repositories we loose access to its webhook and can't delete neither the webhook nor the repository from the DB, despite being effectively impossible to manage for Minder.

error deleting repository from DB: error deleting webhook: error deleting hook: DELETE https://api.github.com/repos/blkt/go-github/hooks/482253255: 403 Resource not accessible by integration []

Note that this might be exacerbated by auto-registration.

A sound behaviour must be defined and implemented for this scenario.

To Reproduce

First, enroll and register a repo

# grant access to all repositories during enrollment
$ minder provider enroll
$ minder repo register -n <repo>

Then, remove the repository from the list under "Repository access" in the installation's page.
Finally

$ minder repo delete -n <repo>

What version are you using?

v0.0.51

@blkt blkt added the bug Something isn't working label Jun 4, 2024
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

No branches or pull requests

1 participant