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

Handle more events than just pull_request #940

Merged
merged 1 commit into from
Nov 4, 2019
Merged

Handle more events than just pull_request #940

merged 1 commit into from
Nov 4, 2019

Conversation

f-meloni
Copy link
Member

@f-meloni f-meloni commented Nov 3, 2019

With GitHub actions you can have more events in the PR than just the simple pull_request one, like for example pull_request_review or pull_request_review_comment

return this.event.pull_request.number
} else if (this.event.issue !== undefined) {
return this.event.issue.number
Copy link
Member Author

@f-meloni f-meloni Nov 3, 2019

Choose a reason for hiding this comment

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

This part is a little bit controversial, I've added it because technically the PR is a particular type of issue, and then I was thinking to someone that wants to run danger when a pr comment is added, and in that case I think he would have to use issue_comment, pull_request_review and pull_request_review_comment triggers.
(An example of that could be verify that there are no open tasks on the comments
like

  • Remove this commented code

)
In issue_comment there is no pull request JSON, only the issue one https://developer.github.com/v3/activity/events/types/#webhook-payload-example-14

Copy link
Member Author

Choose a reason for hiding this comment

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

Happy to remove it if is a bad idea

Copy link
Member

Choose a reason for hiding this comment

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

I'm open to seeing where this goes 👍

@f-meloni
Copy link
Member Author

f-meloni commented Nov 3, 2019

@orta looks like one of the build failed, but just needs to be restarted.
Unfortunately I can not do it, can you please help me with that?

@orta
Copy link
Member

orta commented Nov 4, 2019

cool!

@orta orta merged commit 29138a5 into master Nov 4, 2019
@f-meloni
Copy link
Member Author

f-meloni commented Nov 4, 2019

Thank you @orta :)
I've also updated the CHANGELOG, when you have some time can you please release a new version? :)
Then I can import it directly and try it

@orta
Copy link
Member

orta commented Nov 4, 2019

alright, let's go then

@f-meloni f-meloni deleted the github_actions branch November 4, 2019 23:00
@peril-staging
Copy link
Contributor

peril-staging bot commented Nov 4, 2019

Thanks for the PR @f-meloni.

This PR has been shipped in v9.2.3 - CHANGELOG.

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