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

Repository sync: support removal #2

Open
waltergalvao opened this issue Jun 22, 2024 · 0 comments
Open

Repository sync: support removal #2

waltergalvao opened this issue Jun 22, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@waltergalvao
Copy link
Member

Context

When syncing repositories, our system is only adding new repositories to the database. It should also handle repository removals.

Requirements

When receiving installation_repositories.removed webhooks, we should remove the repository from our database.

Notes:

  • Our GITHUB_REPOSITORIES_SYNC queue currently handle both the added and the removed event. We can keep it that way and just add a delete method with a clause like WHERE id NOT IN (${repositoryIdsThatWereUpserted})
  • Hard deleting the repository should be okay, since any other event (like syncing a Pull Request from a repository) should sync the repository data again.
@waltergalvao waltergalvao added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jun 22, 2024
@waltergalvao waltergalvao changed the title Support removing repositories Repository sync: support removal Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant