GitHub mirrored repos should be read-only
When a repo is mirrored from GitHub (https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/github_integration.html), it's by default pull-only. Therefore, it should be impossible to edit it, unless the project is explicitly configured with Remote mirror repository (Settings -> Repository -> Push to a remote repository).
Steps to reproduce
- Create a public project on GitHub.com
- Create a CI/CD project using this GitHub project
- Edit a file on GitLab
Example Project
https://gitlab.com/plafoucriere/dotrb2013
What is the current bug behavior?
The commit will not be pushed to GitHub, as by default mirrored projects are pull-only. Also, if the user wants to create a MR (likely), GitLab will return a 404 (see screenshots attached).
What is the expected correct behavior?
The project files can't be edited, unless push has been activated too.
Relevant logs and/or screenshots
->
Possible fixes
@jramsay suggested setting mirrored repos as Read-Only.
/cc @bikebilly
Edited by Philippe Lafoucrière

