auto_pr_comments_from_forks
auto_pr_comments_from_forks copied to clipboard
GitHub Feature Update
Hey, I think you might wanna check out on this, https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/#improvements-for-public-repository-forks
After this update, changing the trigger would solve the problem natively through actions, instead of using a cron job.
@HarishTeens yep, GitHub actually contacted me about this repo and I had to explain why it was needed for the FOSS projects :) I'm very happy they listened and came up with the workflow_run event :)
I'm having some trouble with workflow_run and hoping to chat with some other users about it. This issue is as close as I can find to a workflow_run users group!
To be able to make a comment on the correct PR, I need to know which PR triggered the workflow_run. Conveniently, the event contains a reference to the pull request at event.workflow_run.pull_requests[0]:
https://github.com/nyurik/auto_pr_comments_from_forks/runs/884553986?check_suite_focus=true#step:2:231
Unfortunately on fork PRs, event.workflow_run.pull_requests is always empty []. 🤦♂️
Have you figured out how to utilize workflow_run to comment on fork PRs?
@kd7lxl i haven't tried to adapt the new events just yet, hopefully will do so in the near term.
With two simple changes, #4 and #5, I got this working for my use case. 👍
I have a greatly simplified solution to all this (incl. finding the pull request from within workflow_run). It's all in this 1 file:
https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml