git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: Emily Shaffer <emilyshaffer@google.com>, git@vger.kernel.org
Subject: GitGitGadget on git/git, was Re: Should we auto-close PRs on git/git?
Date: Mon, 18 Nov 2019 19:37:57 +0100 (CET)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.1911181930290.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1911142354290.46@tvgsbejvaqbjf.bet>

Hi Peff,

On Fri, 15 Nov 2019, Johannes Schindelin wrote:

> On Thu, 14 Nov 2019, Jeff King wrote:
>
> > On Wed, Nov 13, 2019 at 01:04:35PM +0100, Johannes Schindelin wrote:
> >
> > > > We talked a while ago about having GitGitGadget operate on git/git,
> > > > rather than on a separate mirror. That would automatically help at least
> > > > one class of PR-opener: people who want their patches to reach the list
> > > > but didn't realize they should be using gitgitgadget/git.
> > > >
> > > > I don't remember what the technical blockers are for getting that set
> > > > up, but it seems like a strictly nicer outcome than auto-closing their
> > > > PR.
> > >
> > > Okay, here are a couple of technical challenges, off the top of my head:
> > > [...]
> > > Not an easy, nor a small project, I am afraid.
> >
> > Yow. That's a lot more involved than I was hoping for.

Yeah, it wasn't easy. But then, who does not like a little challenge,
especially the challenge to test things outside of production? So here
is a PR: https://github.com/gitgitgadget/gitgitgadget/pull/148

I trust everybody with even rudimentary Javascript skills to be able to
provide useful feedback on that PR.

To build some confidence in my patches (as you probably know, I do not
trust reviews as much as I trust real-life testing, although I do prefer
to have both) I "kind of" activated it on my fork, limited to act only
on comments _I_ made on PRs (and sending only to me instead of the
list), and it seems to work all right, so far. I cannot say for sure
whether it handles the PR labels correctly, but I guess time will tell,
and I will fix bugs as quickly as I can.

Question is: should I turn this thing on? I.e. install that
GitGitGadget-Git App on https://github.com/git/git? This would allow
GitHub users to `/submit` directly from PRs opened in that repository. I
am sure that there are a few kinks to work out, but I do think that it
should not take long to stabilize.

> > Thanks for writing it up. Some of the points raised were interesting. I
> > do think we'd want git/git (the repository) to remain read-only if
> > possible.
>
> I guess you're right.
>
> We should probably try to restrict the permissions as much as possible,
> not only deny write access to the repository.
>
> For example, one thing GitGitGadget does is to add these "Checks" to the
> commits of the PRs which contain links to the corresponding commits in
> gitster/git (if any). Those can actually not be removed, there is not
> even any API for that. So it would probably make sense to avoid that in
> git/git.
>
> This would mean that the git/git part of GitGitGadget does not install
> those commit mappings. I guess that's okay, they _are_ kinda hard to
> use.

I made it so. The GitGitGadget-Git App only requires write permission to
add PR comments and labels, which I think should be okay. It
specifically has _no_ permission to push to git/git.

> > If GitHub's permissions model is a limiting factor here, let me know
> > and I can try to bring it to the attention of the right people.
>
> I actually don't think that my use case fits any sane permission model
> ;-) After all, I want the GitHub App to _span_ repositories (even orgs),
> and that's not really the idea of Apps.
>
> After sleeping over it, I don't actually think that it is such a bad
> idea to add a second GitHub App with a more limited permission set.

The name _was_ bad, but I did settle for GitGitGadget-Git in the end.
Not the most elegant name, but hey, it works so far.

Ciao,
Dscho

  reply	other threads:[~2019-11-18 18:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-09  2:00 Should we auto-close PRs on git/git? Emily Shaffer
2019-11-09  4:55 ` Junio C Hamano
2019-11-13  5:29   ` Stephen Smith
2019-11-12 19:11 ` Johannes Schindelin
2019-11-13  1:10   ` Jeff King
2019-11-13 12:04     ` Johannes Schindelin
2019-11-14  7:41       ` Jeff King
2019-11-14 23:03         ` Johannes Schindelin
2019-11-18 18:37           ` Johannes Schindelin [this message]
2019-11-21 10:54             ` GitGitGadget on git/git, was " Jeff King
2019-11-22 13:50               ` Johannes Schindelin
2019-11-22 14:43                 ` Johannes Schindelin
2019-11-25 14:30                 ` Jeff King
2019-11-26 20:55                   ` Johannes Schindelin
2019-11-26 21:56                     ` Eric Wong
2019-11-26 22:22                       ` Johannes Schindelin
2019-11-26 22:40                         ` Eric Wong
2019-11-26 22:52                           ` Johannes Schindelin
2019-11-26 23:58                             ` Eric Wong
2019-11-27  1:52                       ` Junio C Hamano
2019-11-27  2:37                         ` Eric Wong
2019-11-13 21:09   ` Emily Shaffer

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-all from there: mbox

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

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

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.1911181930290.46@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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 NNTP newsgroup(s).