GitHub project service integration
When GitLab CI/CD executes pipelines for a project that mirrors a GitHub project, the pipeline status is visible only in GitLab. This requires users to go to GitLab in order to see the health of their project, while they should be able to see it directly in the GitHub interface.
We should implement a way to send the status back to the original project in GitHub, as many other CI/CD systems do.
Create a project service integration for GitHub, that allows sending the status back to the original project using the GitHub status APIs (https://developer.github.com/v3/repos/statuses/).
Ask for the minimal information needed:
- GitHub address (to allow for on-prem GitHub Enterprise) (default to github.com)
- Personal API token (https://github.com/blog/1509-personal-api-tokens)
- Project owner (namespace) (default to namespace, if match found in GitHub)
- Project name (default to project name, if match found in GitHub)
If OAuth2 is configured properly, a button can automatically connect to GitHub account and fill in 1 and 2. [Mark: I don't believe you can use the API to fetch or generate a personal API token, but we can use OAuth instead of a token.]
When active, the service will connect to GitHub and update the commit status automatically.
As a further improvement, the integration can also send environment deployment status to GitHub (#3842).
Links / references
What is it? Why should someone use this feature? What is the underlying (business) problem? How do you use this feature?
Who is this for? Provide one or more use cases.
Make sure these are completed before closing the issue, with a link to the relevant commit.