danger / danger-plugin-template

An opinionated template for creating a Danger plugin
Other
20 stars 10 forks source link

How to access github object inside pluging #5

Closed diogot closed 8 years ago

diogot commented 8 years ago

I'm not a ruby expert so this might be obvious, but I'm doing a plugin based on this template and I got some issues in accessing github object, I need head_commit, I tried this:

commit = github.head_commit

But didn't failed, what is the right way to do it?

orta commented 8 years ago

That's how you access it, could it be running against an older version of Danger ( e.g. before we updated to supporting github.thing? )

For example in danger-prose we use github.branch_for_head

diogot commented 8 years ago

Just figured out, it was my bad! I was running tests and didn't mocked anything, just learning ruby, hehe.

Thanks!