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

  1. Create a public project on GitHub.com
  2. Create a CI/CD project using this GitHub project
  3. 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

Screenshot_2018-04-29_16.15.22

->

Screenshot_2018-04-29_16.36.31

Possible fixes

@jramsay suggested setting mirrored repos as Read-Only.

/cc @bikebilly

Edited Apr 30, 2018 by Philippe Lafoucrière
Assignee Loading
Time tracking Loading