Page MenuHomePhabricator

Import Merge Requests from GitHub read-only mirrored repos into GitLab
Closed, DeclinedPublicFeature

Description

As not everybody contributor reads descriptions on GitHub, the GNOME project has a bot which imports Pull Requests from GitHub (to which GNOME code repos are mirrored read-only, from their canonical GNOME GitLab repositories) as tickets.
Code is at https://gitlab.gnome.org/Infrastructure/openshift-images/github-pull-requests-mirror
Probably makes more sense to investigate creating Merge Requests instead, as we currently don't use GitLab for tickets afaik.

An example of such bot activity can be seen at https://gitlab.gnome.org/GNOME/devdocsgjs/-/issues/44

Dropping this idea (which could end up declined).

Event Timeline

One advantage that Gnome has for implementing this that our GitLab deployment does not have today: "GNOME's GitLab instance also supports GitHub as one of the possible authentication method in case you'd like to follow up on the above issue."

Not having cross realm auth makes importing a drive-by contribution from GitHub into GitLab feel like a relatively low value action. The chances of the patch being both perfect and useful when the patch contributor has not bothered to understand that GitHub is a convenience mirror for the upstream repo to me seem very, very small.

Aklapper triaged this task as Lowest priority.Dec 14 2022, 1:32 AM

Why not have cross-realm auth, though?

Why not have cross-realm auth, though?

That is a fair question, but maybe better handled as a separate topic. The biggest question I suppose is what advantages we achieve by keeping full control of Developer accounts local versus allowing them to be a mix of remote authn via OAuth providers such as GitHub and local authz.

When we migrated from Subversion to Git and Gerrit, we had a discussion about auto importing GitHub pull requests: T37497: Implement a way to bring GitHub pull requests into gerrit. The push was to make it easier to contribute for new comers or bystanders.

My personal view is that the import requests would had trouble to reach out to the original author unless we manage to sync the reviews from Gerrit/Gitlab back to Github or find a way to dynamically create accounts in Gerrit/Gitlab in order to have the original emitter to get the notifications. Or you get maintainers who primarily use Gerrit or Gitlab to have to do reviews on GitHub as well which sounds a burden.

A compromise to ease Gerrit contribution has been https://tools.wmflabs.org/gerrit-patch-uploader/ which is described at https://www.mediawiki.org/wiki/Gerrit_patch_uploader . It is probably little known given it has a hundred of patches uploaded since January 2020 ( https://gerrit.wikimedia.org/r/q/owner:gerritpatchuploader%2540gmail.com ).

I'd have rather one single canonical place to contribute and improvements made so that people can more easily contribute. Iirc that was one of the argument to switch to Gitlab: making it easier to contribute.

Declining per my previous comment, life is easier with a single canonical place to contribute to. Additionally I don't think we replicate the Gitlab repositories to Gitlab, and I don't think we should do anyway.