Working on Gitea without GitHub

The contribution to Gitea is prepared as a GitLab Merge Request by someone who has no GitHub account. It is then manually relayed on behalf of this person by someone who has a GitHub account, as a GitHub Pull Request.

The dialog in each of the Merge Request comments show how this manual workflow came to be:

  • Extract the relevant commits from the Merge Request to create the Pull Request so that the committer is set to the person that relays the Merge Request and the author is set to the person that authors the Merge Request
  • Copy/paste the description and title of the Merge Request to create the Pull Request
  • The person relaying adds a link to the Merge Request in the description of the Pull Request, as well as a mention that they act as a relay
  • The person relaying adds a comment in the Merge Request when they are notified of a comment in the Pull Request so the author is notified (they cannot be notified by GitHub)
  • The author amends the Merge Request to address review comments and answer the comments by citing the comment (leading >). The comments are addressed in the same order they appear in the Pull Request.
  • The amended Merge Request is force pushed to the Pull Request
  • The replies to the to review comments are copy/pasted by the person relaying the Merge Request without further mentioning their origin (it may be confusing to do that).

add coverage for models migration helpers

Integration test for migration

@realaravinth I summarized the workflow that is currently in place. This is valuable User Research because it documents this particular use case. Feel free to edit in case I forgot/misrepresented something (it is a wiki). Federated pull requests are expected to make this workflow redundant and if a piece of software implements what we did manually… it would turn this manual process into something that’s automatic.

1 Like

Practical information to synchronize changes:

  1. Hard reset against upstream’s default branch, main in Gitea’s case.
  2. Grab the merge request’s patch from {merge request URL}.patch
  3. use git am to apply patch
  4. force push with git push -f

Sometimes synchronizing changes without force pushing is required. In that case, it’s possible to selectively grab the patch for the latest commit from GitLab’s web UI, which is available at {commit URL}.patch(example).

1 Like

Force pushing causes problems for reviewers.

1 Like