Skip to content
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

Support issue_comment for pull requests #79

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

allisonport-db
Copy link

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.

@alex-page
Copy link
Owner

alex-page commented Dec 2, 2021

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

@allisonport-db
Copy link
Author

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

@allisonport-db
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflow run fails when triggered by issue_comment for a pull request
2 participants