From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 435BF1F45A for ; Tue, 13 Aug 2019 12:37:08 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 6E025120A6C; Tue, 13 Aug 2019 21:36:56 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id CB989120A69 for ; Tue, 13 Aug 2019 21:36:54 +0900 (JST) Received: by filter0181p3mdw1.sendgrid.net with SMTP id filter0181p3mdw1-1083-5D52AEE8-22 2019-08-13 12:36:56.263366207 +0000 UTC m=+1530700.879287328 Received: from herokuapp.com (unknown [54.224.29.177]) by ismtpd0012p1iad2.sendgrid.net (SG) with ESMTP id BgLLBdp3TG-BWFEp3KRFWw for ; Tue, 13 Aug 2019 12:36:56.196 +0000 (UTC) Date: Tue, 13 Aug 2019 12:36:56 +0000 (UTC) From: takashikkbn@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 69870 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16094 X-Redmine-Issue-Author: k0kubun X-Redmine-Issue-Assignee: k0kubun X-Redmine-Sender: k0kubun X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?9bN4wU0cxWeLAEOz6NELGbwCNAokUg6cnjH8nvx=2FqgZlp6zp3LxoNL3=2FrkJliE?= =?us-ascii?Q?syBgaG5pQHWS7StaBjAK4Wbj=2FMB83BNaju6o4d0?= =?us-ascii?Q?N=2FfKShKGAG=2F4xaDeBwJSj=2FmqmSH7DndCGOUnXdi?= =?us-ascii?Q?zP9y50ZE5GB2FasPlIraLRxfmOdgRtlPDE=2FFL7G?= =?us-ascii?Q?57P0E8dDbK2+EiDNYqQDZ9GnkSzHeB1arLw=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 94323 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 X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" 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/