Make GitLab CI work with a GitHub repository with mirroring

Some customer is interested in having a full CI/CD experience using GitLab CI/CD, even if the code repository is hosted on GitHub.

GitLab CI/CD relies heavily on having the code in a local repo, and cannot be linked to external ones. One possible solution is to mirror the GitHub project on GitLab, and run pipelines from here. Status will be updated via GitHub Status APIs.

To achieve this goal, we need:

It is also useful to make the setup operation easy for users, so they don't have to configure manually everything and have a good user experience when using a GitLab project just for CI/CD:

There is some customer interest in making GitLab CI work with GitHub. Example flow:
  1. Create a repo in GitHub with a .gitlab-ci.yml.
  2. Set up a mirror on GitLab.
  3. Set up a push hook to trigger CI from GitHub -> GitLab
  4. GitLab updates the mirror and runs a build
  5. After build is complete, use the GitHub status API to update the status on GitHub

/cc: @bikebilly, @sytses

Edited by Fabio Busatto