-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Actions: Use new pull_request_target event #765
Comments
NB: Tricky to test, as needs to be merged to |
This blog post describes how we could get the lint comment to work: https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
There must be a blog post or example somewhere that we can pinch to try this out.. |
Tested the linting with the new event trigger and it didn't work, as expected: nf-core/testpipeline#7 So now we know.. |
I started looking into the Lines 1473 to 1525 in 9b3eec9
Specifically, it fetches the PR comments to see if there is a linting comment already. If there is, it updates it. If there isn't, it posts a new one. We'd need to figure out how to do this using a GitHub Actions workflow separate from the Editing instead of reposting is important as otherwise there will be a comment for every commit which is super spammy. |
Ok, I can't resist a good challenge, so I got it to work. Took a lot of trial and error (thank you new |
It has to be merged before it takes effect nf-core/tools#765 (comment)
GitHub Actions has introduced a new event type:
pull_request_target
Switching this in to the
.github/workflows/branch.yml
workflow should mean that we can have automated comments for PRs coming from forks, rather than just branches 🎉I would like to also use it in
linting.yml
, which would that we could have the nice automated comment with thenf-core lint
results from fork PRs. However, I think that we want lint tests to run on the merge commit code, so we probably shouldn't switch this one 😞The text was updated successfully, but these errors were encountered: