github-project-automation-plus icon indicating copy to clipboard operation
github-project-automation-plus copied to clipboard

Support issue_comment for pull requests

Open allisonport-db opened this issue 3 years ago • 3 comments

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.

allisonport-db avatar Dec 02 '21 21:12 allisonport-db

Could we remove the eventName or is_pr completely and just determine the type from the payload?

alex-page avatar Dec 02 '21 22:12 alex-page

Definitely. I'm not at all familiar with JavaScript, you're thinking we pass github.context.payload into generateProjectQuery instead, correct?

allisonport-db avatar Dec 02 '21 23:12 allisonport-db

@alex-page updated as you suggested! Also got rid of the unused getActionData::action and updated githubData to be a logical OR

allisonport-db avatar Dec 03 '21 21:12 allisonport-db