<div dir="ltr"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 17, 2019 at 1:07 PM Daniel Stone <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Thu, 17 Jan 2019 at 16:35, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>> wrote:<br>
> On January 17, 2019 08:58:03 Erik Faye-Lund <<a href="mailto:erik.faye-lund@collabora.com" target="_blank">erik.faye-lund@collabora.com</a>> wrote:<br>
> > Whoops! I meant to say something like "we'd need to be able to<br>
> > distinguis between CI steps that are triggered due to new MRs versus<br>
> > updated MRs, or pushes to existing branches".<br>
> ><br>
> >> Anyway, Jason did actually write that hook, and it's something I'm<br>
> >> happy to host on existing fd.o machines. I just haven't got to doing<br>
> >> it, since I ended up taking my sabbatical a lot more seriously than I<br>
> >> expected, and now I'm back to work I've got a bit of a backlog. But<br>
> >> we<br>
> >> can definitely do it, and pretty soon.<br>
> ><br>
> > Cool, then I won't worry about it, and just assume it'll appear<br>
> > magically soon :)<br>
><br>
> My script was a total hack. It's probably massively insecure and doesn't<br>
> include any code to provide a diffstat which has been requested by several<br>
> people. Someone taking it a bit more seriously would probably be good<br>
> before we deploy anything.<br>
<br>
With the caveat that I can no longer see the script because it's been<br>
expired out of the pastebin (why not make a GitLab repo or at least<br>
upload it to a snippet?) ...<br></blockquote><div><br></div><div><a href="https://gitlab.freedesktop.org/jekstrand/gitlab-mailbot">https://gitlab.freedesktop.org/jekstrand/gitlab-mailbot</a> </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I had the same assumption when you posted it, but came to the<br>
conclusion it was actually OK, or at least would be with very minimal<br>
work. We can configure Apache and GitLab pretty easily so it can only<br>
be triggered with a secret token which is buried in the repo config<br>
and/or accessible only to admins. It calls back into GitLab to get the<br>
changes, so there's no danger of it sending completely arbitrary<br>
content even if someone does figure out how to trigger it when they<br>
shouldn't. It also has GitLab project -> email destination hardcoded<br>
in the script, so there's no danger of it being used to spam arbitrary<br>
addresses either.<br></blockquote><div><br></div><div>That makes me feel a tiny bit better.<br></div></div></div></div>