jan-zabloudil / release-manager

Platform-agnostic tool that streamlines daily operations in release management, planning and deployments 🚀
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

feat: add dedicated endpoint for setting github repository for a project #117

Closed jan-zabloudil closed 3 months ago

jan-zabloudil commented 3 months ago

I realized it won't take much work to prepare a dedicated endpoint for setting a GitHub repository for a project. This will make the overall implementation more solid.

I have added a dedicated endpoint to serve this purpose:

/projects/{id}/github-repository (singular, as you can only set one repository)

The service calls a GitHub client that verifies your access to the specified GitHub repository (and that the repository actually exists). This is another step towards the GitHub refactoring.

The final step will be to create a separate table for GitHub repositories. For now, I have added the fields to the project service model.

I have also kept the current project.GithubRepositoryURL field. I will remove it in a subsequent PR once this one is merged to keep the PR size manageable.

The flow is as follows:


Once this PR is merged, I will also update github client functions (such as reading git tags, creating github release etc.) to accept svcmodel.GithubRepo instead of repoURL.


If you approve, I wll also add tests.