danger / danger-plugin-template

An opinionated template for creating a Danger plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to access github object inside pluging

diogot opened this issue · comments

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?

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

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

Thanks!