Install github app to automatically close PRs on github mirror

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Install github app to automatically close PRs on github mirror

Andres Freund
Hi,

I think the postgres github mirror should install an application that
automatically closes PRs. As there's no better way :(

I found https://github.com/dessant/repo-lockdown/ , which seems
suitable. Only requires read/write permissions for issues/PRs, and
permission to read .github/lockdown.yml. It can be configured in a
separate .github repository.

As an example, here's the config:
https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
and an example PR
https://github.com/anarazel/postgres/pull/1

Greetings,

Andres Freund


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Peter Geoghegan-4
On Wed, Apr 17, 2019 at 3:55 PM Andres Freund <[hidden email]> wrote:
> I found https://github.com/dessant/repo-lockdown/ , which seems
> suitable. Only requires read/write permissions for issues/PRs, and
> permission to read .github/lockdown.yml. It can be configured in a
> separate .github repository.

+1

I think that we should also follow the example of PostGIS, and commit
a file that lets sites like Github know to use 4 bytes for tabs, etc:

https://github.com/postgis/postgis/blob/svn-trunk/.editorconfig

Hopefully that can be done without much fuss.

--
Peter Geoghegan


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Justin Clift-2
In reply to this post by Andres Freund
On 2019-04-18 08:55, Andres Freund wrote:

> Hi,
>
> I think the postgres github mirror should install an application that
> automatically closes PRs. As there's no better way :(
>
> I found https://github.com/dessant/repo-lockdown/ , which seems
> suitable. Only requires read/write permissions for issues/PRs, and
> permission to read .github/lockdown.yml. It can be configured in a
> separate .github repository.
>
> As an example, here's the config:
> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
> and an example PR
> https://github.com/anarazel/postgres/pull/1

Hmmm, PRs to your lockdown repo are being auto-rejected as well.

   https://github.com/anarazel/.github/pull/1

Accidental? ;)

+ Justin


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Daniel Gustafsson
In reply to this post by Andres Freund
On Thursday, April 18, 2019 12:55 AM, Andres Freund <[hidden email]> wrote:

> Hi,
>
> I think the postgres github mirror should install an application that
> automatically closes PRs. As there's no better way :(
>
> I found https://github.com/dessant/repo-lockdown/ , which seems
> suitable. Only requires read/write permissions for issues/PRs, and
> permission to read .github/lockdown.yml. It can be configured in a
> separate .github repository.
>
> As an example, here's the config:
> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
> and an example PR
> https://github.com/anarazel/postgres/pull/1

+1. Nice with a non-invasive improvement over the current state.

cheers ./daniel


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Andres Freund
In reply to this post by Justin Clift-2
Hi,

On 2019-04-18 16:44:29 +1000, Justin Clift wrote:

> On 2019-04-18 08:55, Andres Freund wrote:
> > Hi,
> >
> > I think the postgres github mirror should install an application that
> > automatically closes PRs. As there's no better way :(
> >
> > I found https://github.com/dessant/repo-lockdown/ , which seems
> > suitable. Only requires read/write permissions for issues/PRs, and
> > permission to read .github/lockdown.yml. It can be configured in a
> > separate .github repository.
> >
> > As an example, here's the config:
> > https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
> > and an example PR
> > https://github.com/anarazel/postgres/pull/1
>
> Hmmm, PRs to your lockdown repo are being auto-rejected as well.
>
>   https://github.com/anarazel/.github/pull/1
>
> Accidental? ;)

I installed the app into both repositories - because I wasn't sure
whether it needed the file-path access permission to the
.github/lockdown.yml even if the .github repo is public.  And I was too
lazy to experiment ;)

But it seems to work even without that as long as .github is
public. I've merged your PR now :P

Greetings,

Andres Freund


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Justin Clift-2
On 2019-04-19 02:27, Andres Freund wrote:
<snip>
> I installed the app into both repositories - because I wasn't sure
> whether it needed the file-path access permission to the
> .github/lockdown.yml even if the .github repo is public.  And I was too
> lazy to experiment ;)
>
> But it seems to work even without that as long as .github is
> public. I've merged your PR now :P

Cool. :)

Having the "auto-close" message being friendly can make an important
difference in keeping the potential contributor around.

Have seen this personally. :)

+ Justin


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Andres Freund
Hi,

On 2019-04-19 14:13:12 +1000, Justin Clift wrote:

> On 2019-04-19 02:27, Andres Freund wrote:
> <snip>
> > I installed the app into both repositories - because I wasn't sure
> > whether it needed the file-path access permission to the
> > .github/lockdown.yml even if the .github repo is public.  And I was too
> > lazy to experiment ;)
> >
> > But it seems to work even without that as long as .github is
> > public. I've merged your PR now :P
>
> Cool. :)
>
> Having the "auto-close" message being friendly can make an important
> difference in keeping the potential contributor around.

I totally aggree - but just to be clear, that was my private, unused
fork of the postgres repo. I just wanted to test the github app and
wrote the minimal testcase I could think of ;). If it were the real
postgres repo I'd spend a bit more time on the message than I had...

Greetings,

Andres Freund


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Justin Clift-2
On 2019-04-19 16:28, Andres Freund wrote:

> Hi,
>
> On 2019-04-19 14:13:12 +1000, Justin Clift wrote:
>> On 2019-04-19 02:27, Andres Freund wrote:
>> <snip>
>> > I installed the app into both repositories - because I wasn't sure
>> > whether it needed the file-path access permission to the
>> > .github/lockdown.yml even if the .github repo is public.  And I was too
>> > lazy to experiment ;)
>> >
>> > But it seems to work even without that as long as .github is
>> > public. I've merged your PR now :P
>>
>> Cool. :)
>>
>> Having the "auto-close" message being friendly can make an important
>> difference in keeping the potential contributor around.
>
> I totally aggree - but just to be clear, that was my private, unused
> fork of the postgres repo. I just wanted to test the github app and
> wrote the minimal testcase I could think of ;). If it were the real
> postgres repo I'd spend a bit more time on the message than I had...

Ahhh dammit.  I didn't read closely enough and just assumed you'd
figured
some way of getting it working with the real PG repo.  Oops. ;)

+ Justin


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Andres Freund
In reply to this post by Andres Freund
Hi,

On 2019-04-17 15:55:36 -0700, Andres Freund wrote:

> I think the postgres github mirror should install an application that
> automatically closes PRs. As there's no better way :(
>
> I found https://github.com/dessant/repo-lockdown/ , which seems
> suitable. Only requires read/write permissions for issues/PRs, and
> permission to read .github/lockdown.yml. It can be configured in a
> separate .github repository.
>
> As an example, here's the config:
> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
> and an example PR
> https://github.com/anarazel/postgres/pull/1

Ping?

Greetings,

Andres Freund


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Daniel Gustafsson
> On 24 May 2019, at 18:07, Andres Freund <[hidden email]> wrote:

> On 2019-04-17 15:55:36 -0700, Andres Freund wrote:
>> I think the postgres github mirror should install an application that
>> automatically closes PRs. As there's no better way :(
>>
>> I found https://github.com/dessant/repo-lockdown/ , which seems
>> suitable. Only requires read/write permissions for issues/PRs, and
>> permission to read .github/lockdown.yml. It can be configured in a
>> separate .github repository.
>>
>> As an example, here's the config:
>> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
>> and an example PR
>> https://github.com/anarazel/postgres/pull/1
>
> Ping?

Seconding the above and re-pinging.

cheers ./daniel


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Dave Page-7


On Mon, Jun 17, 2019 at 12:31 PM Daniel Gustafsson <[hidden email]> wrote:
> On 24 May 2019, at 18:07, Andres Freund <[hidden email]> wrote:

> On 2019-04-17 15:55:36 -0700, Andres Freund wrote:
>> I think the postgres github mirror should install an application that
>> automatically closes PRs. As there's no better way :(
>>
>> I found https://github.com/dessant/repo-lockdown/ , which seems
>> suitable. Only requires read/write permissions for issues/PRs, and
>> permission to read .github/lockdown.yml. It can be configured in a
>> separate .github repository.
>>
>> As an example, here's the config:
>> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
>> and an example PR
>> https://github.com/anarazel/postgres/pull/1
>
> Ping?

Seconding the above and re-pinging.

Done.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Daniel Gustafsson
> On 17 Jun 2019, at 14:11, Dave Page <[hidden email]> wrote:

> Done.

Thanks!


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Magnus Hagander-2
In reply to this post by Dave Page-7
On Mon, Jun 17, 2019 at 2:12 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 12:31 PM Daniel Gustafsson <[hidden email]> wrote:
> On 24 May 2019, at 18:07, Andres Freund <[hidden email]> wrote:

> On 2019-04-17 15:55:36 -0700, Andres Freund wrote:
>> I think the postgres github mirror should install an application that
>> automatically closes PRs. As there's no better way :(
>>
>> I found https://github.com/dessant/repo-lockdown/ , which seems
>> suitable. Only requires read/write permissions for issues/PRs, and
>> permission to read .github/lockdown.yml. It can be configured in a
>> separate .github repository.
>>
>> As an example, here's the config:
>> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
>> and an example PR
>> https://github.com/anarazel/postgres/pull/1
>
> Ping?

Seconding the above and re-pinging.

Done.
 

Ugh. Can't we make it figure out which repo it's filing against? And actually send the notice about the pg repo if it's to the pg project and a separate notice for pgadmin, instead of the "if this was for pgadmin, ignore what I just wrote and go over here instead"?

//Magnus

Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Dave Page-7


On Mon, Jun 17, 2019 at 1:29 PM Magnus Hagander <[hidden email]> wrote:
On Mon, Jun 17, 2019 at 2:12 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 12:31 PM Daniel Gustafsson <[hidden email]> wrote:
> On 24 May 2019, at 18:07, Andres Freund <[hidden email]> wrote:

> On 2019-04-17 15:55:36 -0700, Andres Freund wrote:
>> I think the postgres github mirror should install an application that
>> automatically closes PRs. As there's no better way :(
>>
>> I found https://github.com/dessant/repo-lockdown/ , which seems
>> suitable. Only requires read/write permissions for issues/PRs, and
>> permission to read .github/lockdown.yml. It can be configured in a
>> separate .github repository.
>>
>> As an example, here's the config:
>> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
>> and an example PR
>> https://github.com/anarazel/postgres/pull/1
>
> Ping?

Seconding the above and re-pinging.

Done.
 

Ugh. Can't we make it figure out which repo it's filing against? And actually send the notice about the pg repo if it's to the pg project and a separate notice for pgadmin, instead of the "if this was for pgadmin, ignore what I just wrote and go over here instead"?

Only by putting the config in the individual repo from what I can see. And that's even more ugh.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Magnus Hagander-2

On Mon, Jun 17, 2019 at 2:42 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 1:29 PM Magnus Hagander <[hidden email]> wrote:
On Mon, Jun 17, 2019 at 2:12 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 12:31 PM Daniel Gustafsson <[hidden email]> wrote:
> On 24 May 2019, at 18:07, Andres Freund <[hidden email]> wrote:

> On 2019-04-17 15:55:36 -0700, Andres Freund wrote:
>> I think the postgres github mirror should install an application that
>> automatically closes PRs. As there's no better way :(
>>
>> I found https://github.com/dessant/repo-lockdown/ , which seems
>> suitable. Only requires read/write permissions for issues/PRs, and
>> permission to read .github/lockdown.yml. It can be configured in a
>> separate .github repository.
>>
>> As an example, here's the config:
>> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
>> and an example PR
>> https://github.com/anarazel/postgres/pull/1
>
> Ping?

Seconding the above and re-pinging.

Done.
 

Ugh. Can't we make it figure out which repo it's filing against? And actually send the notice about the pg repo if it's to the pg project and a separate notice for pgadmin, instead of the "if this was for pgadmin, ignore what I just wrote and go over here instead"?

Only by putting the config in the individual repo from what I can see. And that's even more ugh.
 

Same problem applies with the pgweb repo which also got a bunch of pretty unfriendly messages now.

Maybe this whole thing should've been more thought through :/

//Magnus 
Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Dave Page-7


On Mon, Jun 17, 2019 at 1:59 PM Magnus Hagander <[hidden email]> wrote:

On Mon, Jun 17, 2019 at 2:42 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 1:29 PM Magnus Hagander <[hidden email]> wrote:
On Mon, Jun 17, 2019 at 2:12 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 12:31 PM Daniel Gustafsson <[hidden email]> wrote:
> On 24 May 2019, at 18:07, Andres Freund <[hidden email]> wrote:

> On 2019-04-17 15:55:36 -0700, Andres Freund wrote:
>> I think the postgres github mirror should install an application that
>> automatically closes PRs. As there's no better way :(
>>
>> I found https://github.com/dessant/repo-lockdown/ , which seems
>> suitable. Only requires read/write permissions for issues/PRs, and
>> permission to read .github/lockdown.yml. It can be configured in a
>> separate .github repository.
>>
>> As an example, here's the config:
>> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
>> and an example PR
>> https://github.com/anarazel/postgres/pull/1
>
> Ping?

Seconding the above and re-pinging.

Done.
 

Ugh. Can't we make it figure out which repo it's filing against? And actually send the notice about the pg repo if it's to the pg project and a separate notice for pgadmin, instead of the "if this was for pgadmin, ignore what I just wrote and go over here instead"?

Only by putting the config in the individual repo from what I can see. And that's even more ugh.
 

Same problem applies with the pgweb repo which also got a bunch of pretty unfriendly messages now.

Maybe this whole thing should've been more thought through :/

Maybe, but there was discussion, and plenty of time for people to object, which noone did.

I think what's there now is far better than a bunch of un-answered PRs rotting away.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Magnus Hagander-2
On Mon, Jun 17, 2019 at 3:03 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 1:59 PM Magnus Hagander <[hidden email]> wrote:

On Mon, Jun 17, 2019 at 2:42 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 1:29 PM Magnus Hagander <[hidden email]> wrote:
On Mon, Jun 17, 2019 at 2:12 PM Dave Page <[hidden email]> wrote:


On Mon, Jun 17, 2019 at 12:31 PM Daniel Gustafsson <[hidden email]> wrote:
> On 24 May 2019, at 18:07, Andres Freund <[hidden email]> wrote:

> On 2019-04-17 15:55:36 -0700, Andres Freund wrote:
>> I think the postgres github mirror should install an application that
>> automatically closes PRs. As there's no better way :(
>>
>> I found https://github.com/dessant/repo-lockdown/ , which seems
>> suitable. Only requires read/write permissions for issues/PRs, and
>> permission to read .github/lockdown.yml. It can be configured in a
>> separate .github repository.
>>
>> As an example, here's the config:
>> https://github.com/anarazel/.github/blob/master/.github/lockdown.yml
>> and an example PR
>> https://github.com/anarazel/postgres/pull/1
>
> Ping?

Seconding the above and re-pinging.

Done.
 

Ugh. Can't we make it figure out which repo it's filing against? And actually send the notice about the pg repo if it's to the pg project and a separate notice for pgadmin, instead of the "if this was for pgadmin, ignore what I just wrote and go over here instead"?

Only by putting the config in the individual repo from what I can see. And that's even more ugh.
 

Same problem applies with the pgweb repo which also got a bunch of pretty unfriendly messages now.

Maybe this whole thing should've been more thought through :/

Maybe, but there was discussion, and plenty of time for people to object, which noone did.

Well, nobody in that discussion pointed out that we'd have to have a message that was that unfriendly :/  Had people known, they might have objected...


I think what's there now is far better than a bunch of un-answered PRs rotting away.

Oh I agree. The message should be updated to reflect the rest of the repos though, particularly pgweb is there and is now getting incorrect information sent out.

 
--
Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Justin Clift-2
On 2019-06-17 23:27, Magnus Hagander wrote:
> On Mon, Jun 17, 2019 at 3:03 PM Dave Page <[hidden email]> wrote:
<snip>
>> Maybe, but there was discussion, and plenty of time for people to
>> object,
>> which noone did.
>
> Well, nobody in that discussion pointed out that we'd have to have a
> message that was that unfriendly :/  Had people known, they might have
> objected...

Looking at the current wording, eg example message from 3 hours ago:

   https://github.com/postgres/postgres/pull/41#issuecomment-502660775

The text now seems friendly enough, though it could do with a bit more
white space for readability:

> Thanks for your Pull Request! :) This repo on GitHub is just a
> mirror of our real git repositories though, and can't really handle
> PRs. :( Hopefully you can redo the PR, and direct it to the
> git.postgresql.org repos? We have a developer guide, if that
> helps:
> https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F.
> If this was a PR for pgAdmin, please visit
> https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html.

Hmmm... that wall of text really could do with breaking up if possible.

Is that feasible?

+ Justin


Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Stephen Frost
Greetings,

* Justin Clift ([hidden email]) wrote:

> On 2019-06-17 23:27, Magnus Hagander wrote:
> >Thanks for your Pull Request! :) This repo on GitHub is just a
> >mirror of our real git repositories though, and can't really handle
> >PRs. :( Hopefully you can redo the PR, and direct it to the
> >git.postgresql.org repos? We have a developer guide, if that
> >helps: https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F.
> >If this was a PR for pgAdmin, please visit
> >https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html.
>
> Hmmm... that wall of text really could do with breaking up if possible.
Agreed.

What about:

--------------
Thanks for your Pull Request! :) This repo on GitHub is just a
mirror of our real git repository (which lives on git.postgresql.org)
though, and can't really handle PRs. :(

If you'd like to see this change in PostgreSQL, please check out our
developer guide, here:

https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F

If this was a PR for pgAdmin, please see this guide instead:

https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html
--------------

Telling people to direct their PR to the git.postgresql.org repos
doesn't really make sense...

Thanks!

Stephen

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Install github app to automatically close PRs on github mirror

Magnus Hagander-2
On Tue, Jun 18, 2019 at 4:00 PM Stephen Frost <[hidden email]> wrote:
Greetings,

* Justin Clift ([hidden email]) wrote:
> On 2019-06-17 23:27, Magnus Hagander wrote:
> >Thanks for your Pull Request! :) This repo on GitHub is just a
> >mirror of our real git repositories though, and can't really handle
> >PRs. :( Hopefully you can redo the PR, and direct it to the
> >git.postgresql.org repos? We have a developer guide, if that
> >helps: https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F.
> >If this was a PR for pgAdmin, please visit
> >https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html.
>
> Hmmm... that wall of text really could do with breaking up if possible.

Agreed.

What about:

--------------
Thanks for your Pull Request! :) This repo on GitHub is just a
mirror of our real git repository (which lives on git.postgresql.org)
though, and can't really handle PRs. :(

I would say "don't work with" rather than "can't handle".


If you'd like to see this change in PostgreSQL, please check out our
developer guide, here:

https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F

If this was a PR for pgAdmin, please see this guide instead:

https://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html
--------------

That does sound a lot better. It should also include pgweb, which also has a mirror there.


Telling people to direct their PR to the git.postgresql.org repos
doesn't really make sense...


Indeed. +1.

//Magnus

12