Update Dangerfile

This commit is contained in:
Miguel Piedrafita 2016-12-06 10:22:42 +01:00 committed by GitHub
parent f94c4c9e17
commit a6d32589d8
1 changed files with 9 additions and 2 deletions

View File

@ -28,5 +28,12 @@ if has_readme_changes
markdown j['message']
end
end
json = pr_json
require ".danger/danger.rb"
if has_readme_changes
require 'rubygems'
require 'json'
require 'octokit'
client = Octokit::Client.new(:access_token => GITHUB_DANGER_API_TOKEN)
user = client.user
user.login
data = JSON.parse(json)
Octokit.add_labels_to_an_issue("bayandin/awesome-awesomeness", data['number'], ['Changes Required'])