Install github app to automatically close PRs on github mirror

classic Classic list List threaded Threaded
8 messages Options
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