ubicloud/spec/routes/web/webhook
Enes Cakir 4385c4a6cb Add a prog to destroy GitHub installation
GithubInstallation has repositories and runners that must be destroyed
when the installation is destroyed. Given that they have strands, their
removal is asynchronous. However, the installation must be removed
synchronously when we receive a webhook from GitHub or when the user
attempts to delete the project. Currently, it fails if the installation
has any repositories or runners.

Since the installation doesn't have a strand, I've created an
operational strand to facilitate its destruction. In this prog, we
initially delete the installation from the GitHub API. This ensures that
GitHub will no longer send us new webhook events. Then it destroys the
repositories and runners, then proceed to destroy the installation. It
bypasses deregistration of the runner to ensure destroy it immediately,
even if it's currently running a job.

We may also need to manually clean up the installation due to fraudulent
activities. This prog will assist with these operations.
2024-10-03 17:37:42 +03:00
..
github_spec.rb Add a prog to destroy GitHub installation 2024-10-03 17:37:42 +03:00