gitlab_repository_check

command
v0.0.0-...-ec43350 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: MIT Imports: 1 Imported by: 0

README

GitLab Repository Check Lambda

GitLab (currently) does not support sending callback/webhook events for GitLab project add or delete events. As a result, we created a small lambda that runs periodically to check for any new GitLab project (repository) add or deletes.

The process/algorithm is:

  1. Query our database for registered GitLab Groups - filter by the enabled flag is true and where the Auto Enable flag is true
  2. For each GitLab group in our database...
    1. Create a new GitLab API client instance using the authorization token for the Git Group
    2. Query the GitLab API for the project list under the group (include sub-groups). This grabs the list of current GitLab projects under the GitLab group.
    3. Query for GitLab project in DB matching this GitLab group path
    4. Identify deltas - this identifies how many new and deleted GitLap projects we need to process
    5. If any new GitLab projects, add to the DB, set enabled, create an event log
    6. If any removed/deleted GitLab projects, remove from the DB, create an event log

References

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL