z0al/dependent-issues

Dependency Checker Triggers.

mathomp4 opened this issue · 3 comments

A question about this cool GitHub Action. I'm trying it out in a throwaway repo I have, and I tested it here:

mathomp4/labeltest#6

In this repo, I made main a protected branch, and set Dependent Issues as a required status check under the branch protections. So I had two PRs (5 and 6) and closed and merged 5. And eventually the bot seemed to report to 6 that 5 closed. I then created a new PR, 7:

mathomp4/labeltest#7

and after opening it, I added a comment saying "Blocked by 6". This didn't seem to trigger the bot.

So I guess my question is: is this one of those actions that only the daily crontab sweep will pick up? Maybe there's something I can add to the pull_request_target to act on... pull request comments?

Staring at the GitHub Actions docs, maybe pull_request_review_comment is what I want? https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_review_comment

(I'm a bit of an "end user" of GitHub Actions. I try, but dang, the syntax can confuse me!)

I tried out the review comment event and I'm not getting anything either. Looks like it's only the PR description, which is fine.

z0al commented

Hey, glad you find this action helpful.

and after opening it, I added a comment saying "Blocked by 6". This didn't seem to trigger the bot.

Yeah, this is a design decision. This project actually used to support comments (a few years back when it was a bot), but it has proven to be not as helpful we liked it to be as it was not easy to spot the full list of dependencies in one place. It also meant that we had to check if the user commenting has the right to update the dependencies and so on.

So, similar to the way the native closes/resolves command works, we decided to support declaring dependencies only from the PR/Issue description. That guarantees that only the people with the right permissions can update the list, and also makes it easy to spot the list of dependencies without scrolling down looking for comments.

Closing as I have no plans to support comments atm but happy to reconsider if you have an interesting counter-argument :)