github-project-automation-plus
github-project-automation-plus copied to clipboard
Support issue_comment for pull requests
Fixes #78
Currently all issue_events are recognized as issues, but they can also be pull requests.
Instead of determining if the event is an "Issue" or "Pull Request" with eventName in generate-project-query.js, add is_pr as an argument from action-data --> generate-project-query, and determine is_pr using the github payload.
Tested it with new issues, new issue_comments, new PR's, and new PR comments.
Could we remove the eventName or is_pr completely and just determine the type from the payload?
Definitely. I'm not at all familiar with JavaScript, you're thinking we pass github.context.payload into generateProjectQuery instead, correct?
@alex-page updated as you suggested!
Also got rid of the unused getActionData::action and updated githubData to be a logical OR