Map GitHub SCM Repository to GitLab Project
We need a way to properly map webhooks repository Ids to GitLab project ids.
There's two ways to import a Github project into Gitlab - https://gitlab.com/projects/new#cicd_for_external_repo
- Import by repository URL
- "Import GitHub" button, currently disabled
For #1 There's a current workout of passing a PAT into the password field (as GitHub does not accept User/Password) auths
For #2 The user passes a PAT with repo abilities.
Acceptance Criteria
We would only support #2 but instead of using a PAT, have the admin OAuth with GitHub/Gitlab.
Then clicking on the Import GitHub button, and going through this workflow. The customer should be able to import a project only to use it as a CI/CD solution
Proposal
Following designs in #505054: We could add a checkbox/setting to these pages to state SCM/Issues/etc will not be imported into Gitlab.
During the import, the RepositoryImportWorker would make an API request to GitHub using the API token, and get the repository ID. And store this mapping into a new table