Less complex source code (+ easier to implement new functionalities)
We have one to one correspondence between a project and a repo. Thus, Double information is stored without particular reason. All Repository’s struct fields (ID, CreatedAt, UpdatedAt, RepositoryUrl, Project, ProjectID, IssueCount, Issues, LastParsed, Tags) are also fields of the Project’s struct (maybe with another name) or links to the corresponding project.
User is only able to see projects (repositories are not visible)
So we need one, but which one?
We use the Project Model and not the Repository Model because:
Open Source Contributors know them as “projects”
Better compatibility with the current front-end (only /api/projects endpoint available)
Conclusion:
GitLab: what we want is called “project”, so we are ok.
GitHub: we use repos endpoint. We get the information from there and we just name it as “project”.
We just need one model because:
So we need one, but which one?
We use the Project Model and not the Repository Model because: Open Source Contributors know them as “projects” Better compatibility with the current front-end (only /api/projects endpoint available)
Endpoints
developer.github.com/v3/projects docs.gitlab.com/ee/api/repositories.html
developer.github.com/v3/repos docs.gitlab.com/ee/api/projects.html
Conclusion: GitLab: what we want is called “project”, so we are ok. GitHub: we use repos endpoint. We get the information from there and we just name it as “project”.