Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • G git-eca-rest-api
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse FoundationEclipse Foundation
  • IT
  • APIs
  • git-eca-rest-api
  • Issues
  • #78
Closed
Open
Issue created Sep 23, 2022 by Martin Lowe@malowe🇨🇦Maintainer

Create a POST endpoint for system hooks to inspect new private projects

When we enable new private projects, we want to ensure that projects created are forks associated with a repository and not bare repositories with code unrelated to Eclipse projects. To that end, we will want to accept system hook events to receive project_create events and inspect the created project.

Once we receive a system hook call, we need to verify the event type and then cast the data to the proper request type. This is required as Gitlab does not allow for scoping which system events can or cannot create webhook calls. An additional note is that the endpoint should reflect this and be a generic path, such as /git/webhooks/gitlab/system. This hook should trigger a queued event in an executor as we don't want to block the request while we validate the data (the hook doesn't accept responses, so we don't want to lock up system resources for no reason).

As the project creation event does not include information about whether a project is a fork, we will have to callback to Gitlab to read this information. We should consider using a Gitlab lib like Gitlab4J to simplify some of the writing of code and reduce maintenance costs. We should then inspect the data that we get back about the new project, and check if we should delete.

Conditions for deletion:

  • Project is private
  • Project is in a users namespace
  • Project has no forked from/parent repo data

@mbarbero are there any other conditions we want to observe for deleting private projects? I think this covers what we will need for the MBO.

Assignee
Assign to
Time tracking

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent