class Danger::DangerfileDangerPlugin

A way to interact with Danger herself. Offering APIs to import plugins, and Dangerfiles from multiple sources.

@example Import a plugin available over HTTP

device_grid = "https://raw.githubusercontent.com/fastlane/fastlane/master/danger-device_grid/lib/device_grid/plugin.rb"
danger.import_plugin(device_grid)

@example Import from a local file reference

danger.import_plugin("danger/plugins/watch_plugin.rb")

@example Import all files inside a folder

danger.import_plugin("danger/plugins/*.rb")

@example Run a Dangerfile from inside a sub-folder

danger.import_dangerfile(path: "path/to/Dangerfile")

@example Run a Dangerfile from inside a gem

danger.import_dangerfile(gem: "ruby-grape-danger")

@example Run a Dangerfile from inside a repo

danger.import_dangerfile(gitlab_project_id: 1345)

@example Run a Dangerfile from inside a repo branch and path

danger.import_dangerfile(github: "ruby-grape/danger", branch: "custom", path: "path/to/Dangerfile")

@example Import a plugin available over HTTP

custom_url = "https://custom.bitbucket.com/project-name/Dangerfile?raw"
danger.import_dangerfile(url: custom_url)

@see danger/danger @tags core, plugins