github-bot icon indicating copy to clipboard operation
github-bot copied to clipboard

feat: relay jenkins and gh events to gh

Open mmarchini opened this issue 3 years ago • 11 comments

Initial implementation of the "Actions relay" suggested here: https://github.com/nodejs/github-bot/issues/264. Doesn't work yet because createDispatchEvent is not available on the github version we're using.

(current PR rebased on top of #271 and #270, actual implementation here)

mmarchini avatar Aug 02 '20 23:08 mmarchini

Ah, one thing we need for GitHub events is to differentiate events coming from people with write access to the repo vs people without write access to it. We can append a ! when the event has write access or smth (dispatch event will always have write access in the action, which is fine, but it's good for us to filter some actions so they only run for people with the right permissions).

mmarchini avatar Aug 09 '20 03:08 mmarchini

That sounds convenient indeed! 👍

phillipj avatar Aug 09 '20 10:08 phillipj

Oh nice, the GitHub part of this PR was rendered unnecessary by GitHub earlier this week: https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/. With the new event announced in this blog post we can move everything we have here to Actions on nodejs/node, except for the Jenkins status updater, which will still need the relay.

mmarchini avatar Aug 10 '20 06:08 mmarchini

Hooray! Cool to see how that in practise made CI-start-on-label in nodejs/node (https://github.com/nodejs/node/pull/34707) a lot simpler as well 💯

phillipj avatar Aug 10 '20 08:08 phillipj

I take it back, the new event is still not enough for some use cases (basically any use case that is not a check/linter/test), so we still want the relay

mmarchini avatar Aug 11 '20 23:08 mmarchini

FYI I'll break this into two PRs: one for the Jenkins relay and one for the GitHub relay. Starting with the Jenkins relay which I think is more straightforward. This will allow us to experiment and tweak with it before adding GitHub as well. Also, if it works as expected we'll be able to remove a good chunk of code once we move Jenkins PR status to Actions :D

mmarchini avatar Aug 15 '20 08:08 mmarchini

Good idea! I'm a big fan of ship-small-and-tweak 👍

phillipj avatar Aug 17 '20 19:08 phillipj

@mmarchini you okey with me picking up the jenkins relay work you mentioned if I find the time?

Would be cool to contribute to the recent GitHub Actions efforts and move us in a direction we touched upon in the modernisation issue (https://github.com/nodejs/github-bot/issues/264).

phillipj avatar Nov 02 '20 21:11 phillipj

I'm just back from vacation and was planning on picking this up again in a few weeks :)

If you have time before that, feel free to pick it up.

mmarchini avatar Nov 02 '20 21:11 mmarchini

Cool, welcome back from a well deserved break 😎

On Mon, 2 Nov 2020 at 22:36, mary marchini [email protected] wrote:

I'm just back from vacation and was planning on picking this up again in a few weeks :)

If you have time before that, feel free to pick it up.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nodejs/github-bot/pull/272#issuecomment-720738416, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMWE2FXJWKAFZSH7IPORDSN4Q7BANCNFSM4PSZLWKQ .

phillipj avatar Nov 02 '20 21:11 phillipj

Just opened https://github.com/nodejs/github-bot/pull/289 with one of the commits from this PR cherry picked & slimmed to only relay Jenkins events for now.

phillipj avatar Nov 29 '20 20:11 phillipj

I'm going to close this as stagnant but by all means re-open if someone is going to be working on it. Thanks.

Trott avatar Aug 25 '22 03:08 Trott