ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: takashikkbn@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:94323] [Ruby master Misc#16094] Allow only "Rebase and merge" or "Squash and merge" on GitHub, and sync it on git.ruby-lang.org pre-receive hook
Date: Tue, 13 Aug 2019 12:36:56 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-80710.20190813123655.b6144a03b09eaf73@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-16094.20190810093021@ruby-lang.org

Issue #16094 has been updated by k0kubun (Takashi Kokubun).

Status changed from Assigned to Closed

While this feature is experimental, I wrote a script to automatically check the consistency between Git repositories every 10 minutes. So it's somewhat safe now, and we'd be able to always restore the repository from logs. I'll take the responsibility to do the recovery if something happens...

That being said, I enabled "write" access to "ruby-committers" team to use the GitHub merge button with either "Squash and merge" and "Rebase and merge". As discussed in [Misc #16093], a "Create a merge commit" is disabled. It's available only for master branch, and other branches are protected by CI.

Here's the summary:

## What's changed?
* You can push "Squash and merge" or "Rebase and merge" on a GitHub pull request, but only for master branch.

## What's not changed?
* Committers should continue to use git.ruby-lang.org for usual `git pull` / `git push` destination.
* Nothing is changed in branches other than "master".
  * "master" is the only branch which is synchronized bidirectionally.
  * "trunk" and "master" are mirrored each other, but pull requests can be merged only to "master". Of course, you can still push commits to "trunk" branch from git.ruby-lang.org as before.
* `git push` to git.ruby-lang.org became slightly slower, almost as slow as `git push` to GitHub. I'm really sorry about this.
* You cannot directly push to GitHub ruby/ruby master branch, except "admin" users.
  * We need to allow this to admin users because matzbot (admin) needs to sync commits to GitHub.
  * While `git push` to GitHub ruby/ruby master branch would work by bidirectional sync, to simplify the problem, admin should not push commits directly to GitHub.
  * "admin" users: ruby/ruby owners (@matsuda, @hsbt, @mame, @naruse), @k0kubun, and matzbot.
* You cannot use a merge button against non-master branches, except "admin" users.
  * Pushing whatever commits to non-master branch would introduce inconsistency, just as before (this fact is NOT changed in this ticket). Be careful, "admin" users.

----------------------------------------
Misc #16094: Allow only "Rebase and merge" or "Squash and merge" on GitHub, and sync it on git.ruby-lang.org pre-receive hook
https://bugs.ruby-lang.org/issues/16094#change-80710

* Author: k0kubun (Takashi Kokubun)
* Status: Closed
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
----------------------------------------
## Problem
* Our pull request merge strategy confuses contributors, as described in [Misc #16093].
* In [Misc #16093], some committers did not like accepting a merge commit.

## Solution
* Allow using GitHub's "Rebase and merge" (suggested by @marcandre) and "Squash and merge" (for editing a commit message as needed) to committers
  * Disable "Create a merge commit" in GitHub repository settings, to avoid concerns found in [Misc #16093].
  * Also prohibit pushes to the master branch which are not coming from a pull request by requiring CI in GitHub repository settings.
  * To allow looking up an associated GitHub pull request from git commands, add `git notes` to "Rebase and merge"d commits in git.ruby-lang.org post-receive hook. (suggested by @nobu)
* Perform GitHub bidirectional sync on git.ruby-lang.org pre-receive hook, and accept a push if it does not conflict with "Rebase and merge" on GitHub.

## Notes
* Even after implementing this ticket, the Ruby's canonical Git repository will continue to be git.ruby-lang.org as is.
* All committers must push non-pull-request commits to git.ruby-lang.org. Direct pushes to GitHub will continue to be disabled.
* This approach has one drawback; `git push` to git.ruby-lang.org might block longer than now.



-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2019-08-13 12:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-16094.20190810093021@ruby-lang.org>
2019-08-10  9:30 ` [ruby-core:94247] [Ruby master Misc#16094] Allow only "Rebase and merge" on GitHub and sync it on git.ruby-lang.org pre-receive hook takashikkbn
2019-08-11  3:47 ` [ruby-core:94265] " takashikkbn
2019-08-11  4:16 ` [ruby-core:94266] " nobu
2019-08-11  4:29 ` [ruby-core:94267] " takashikkbn
2019-08-11  7:41 ` [ruby-core:94270] [Ruby master Misc#16094] Allow only "Rebase and merge" or "Squash and merge" on GitHub, " takashikkbn
2019-08-12  8:09 ` [ruby-core:94304] " takashikkbn
2019-08-12 11:26 ` [ruby-core:94306] " takashikkbn
2019-08-12 16:53 ` [ruby-core:94307] " takashikkbn
2019-08-13 12:36 ` takashikkbn [this message]
2019-08-13 20:09 ` [ruby-core:94328] [Ruby master Misc#16094] Allow only "Rebase and merge" or "Squash and merge" on GitHub master branch, and sync it on git.ruby-lang.org update hook samuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-80710.20190813123655.b6144a03b09eaf73@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).