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

Add support for repository_dispatch event #98

Merged
merged 5 commits into from
Aug 2, 2020

Conversation

kpenfound
Copy link
Contributor

Add support for repository_dispatch as an event type. Using the same logic as the labeled event since the workflow should be similar.

lib/api.js Outdated
@@ -299,4 +301,43 @@ async function handleIssueComment(context, eventName, event) {
}
}

async function handleRepositoryDispatch(context) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's just copied from handleScheduleTrigger. Instead, there should be a common method, e.g. handleScheduleTriggerOrRepositoryDispatch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, I'll do it that way. The logic behind copying/duplicating was that while the logic for ScheduleTrigger and RepositoryDispatch are the same right now, it's likely that in the future a feature/enhancement will apply to one and not the other

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@pascalgn pascalgn merged commit 772ea68 into pascalgn:master Aug 2, 2020
@pascalgn
Copy link
Owner

pascalgn commented Aug 2, 2020

Thanks for the PR, it's merged now! 👍

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.

2 participants