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

Take the property service into use in webhook and repository service #4299

Merged
merged 8 commits into from
Aug 29, 2024

Commits on Aug 29, 2024

  1. Accept transaction from outside in the property service

    If we had called these methods in a transaction, we would have
    effectivelly created another parallel transaction which might cause
    entities to not be referenced correctly.
    jhrozek committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    f8a282d View commit details
    Browse the repository at this point in the history
  2. Add FilteredCopy and Merge to properties

    These will be useful later.
    jhrozek committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    b45ab5f View commit details
    Browse the repository at this point in the history
  3. Add EntityInstance model

    This is just a shortcut to avoid passing the properties and project ID
    and entity etc around
    jhrozek committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    8332e8a View commit details
    Browse the repository at this point in the history
  4. Decouple entities from fetching properties

    This makes it easier to handle multiple entities inside the github
    provider as all that is needed is to implement the PropertyFetcher
    interface. It also makes moves the logic around formatting the name and
    what properties are operational into the provider to code that is
    per-entity.
    jhrozek committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    306c329 View commit details
    Browse the repository at this point in the history
  5. Handle operational attributes

    minder saves attributes like hook ID which do not come from the upstream
    entity. We need to avoid deleting them on updates.
    jhrozek committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    21b1e2a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fb8dae5 View commit details
    Browse the repository at this point in the history
  7. Switch over webhook handling to use property entities

    Changes fetchRepo to refresh the repository being processed and return
    an EntityInstance model structure instead of a database repo
    
    Related: mindersec#4173
    jhrozek committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    c622759 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4c11afe View commit details
    Browse the repository at this point in the history