[libvirt PATCH] github: enable lockdown of issues and merge requests
Daniel P. Berrangé
berrange at redhat.com
Fri Apr 3 14:26:31 UTC 2020
On Fri, Apr 03, 2020 at 08:55:11AM -0500, Eric Blake wrote:
> On 4/3/20 5:38 AM, Daniel P. Berrangé wrote:
> > Libvirt uses GitHub as an automated read-only mirror. The goals were to
> > have a disaster recovery backup for libvirt.org, a way to make it easy
> > for people to clone their own private copy of libvirt Git, and finally
> > as a way to interact with apps like Travis.
> > The project description was set to a message telling people that we
> > don't respond to pull requests. This was quite a negative message to
> > potential contributors, and also did not give them any guidance about
> > the right way to submit to libvirt. Many also missed the description and
> > submitted issues or pull requests regardless.
> > It is possible to disable the issue tracker in GitHub, but there is no
> > way to disable merge requests. Disabling the issue tracker would also
> > leave the problem of users not being given any positive information
> > about where they should be reporting instead.
> > There is a fairly new 3rd party application built for GitHub that
> > provides a bot which auto-responds to both issues and merge requests,
> > closing and locking them, with a arbitrary comment:
> > https://github.com/apps/repo-lockdown
> > This commit adds a suitable configuration file for libvirt, which
> > tries to give a positive response to user's issue/pullreq and guide
> > them to the desired contribution path on GitLab.
> > Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> > ---
> > FYI, I have configured the test.git repo to demonstrate the operation.
> > See the comments / actions performed here:
> > https://github.com/libvirt/test/pull/3
> > https://github.com/libvirt/test/issues/2
> > This lockdown.yml file will need to be created in each libvirt git
> > repo, with just the URL changed. If this patch is approved, then I
> > propose to directly push the equivalent config file to every other
> > git repo, without spamming libvir-list for review of each.
> Makes sense to me.
> > +++ b/.github/lockdown.yml
> > @@ -0,0 +1,36 @@
> > +# Configuration for Repo Lockdown - https://github.com/dessant/repo-lockdown
> > +
> > +# Close issues and pull requests
> > +close: true
> > +
> > +# Lock issues and pull requests
> > +lock: true
> > +
> > +# Optionally, specify configuration settings just for `issues` or `pulls`
> > +issues:
> > + comment: |
> > + Thank you for your interest in the libvirt project.
> > +
> > + Since this repository is a read-only mirror of the project's master repostory hosted on GitLab, issues opened here are not processed.
> Is line-wrapping this worthwhile?
The content here is treated as literal markdown, with line breaks
preserved. If I line wrap it here, then it gets line wrapped when
displayed to the user which is not desirable - I want to let the
browser wrap according to the space it has to display the comment.
Using ">" instead of "|" for the multiple line string lets you
do wrapping, which is then ignored, but this has the annoying
side effect of also removing the blank lines between paragraphs.
So the long lines were the least worst option to give the desired
display in the browser that I came up with.
> Reviewed-by: Eric Blake <eblake at redhat.com>
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list