module Github

Public Instance Methods

add_labels(*new_labels) click to toggle source
# File lib/wcc/github.rb, line 17
def add_labels(*new_labels)
  existing = labels.map(&:name)
  new_labels.reject { |l| existing.include?(l) }.each do |to_create|
    github.api.add_label(repo_name, to_create)
  end
  github.api.add_labels_to_an_issue(repo_name, pr_number, new_labels)
end
labels() click to toggle source
# File lib/wcc/github.rb, line 4
def labels
  @github_labels ||=
    github.api.labels(repo_name)
end
pr_number() click to toggle source
# File lib/wcc/github.rb, line 13
def pr_number
  github.pr_json['number']
end
repo_name() click to toggle source
# File lib/wcc/github.rb, line 9
def repo_name
  github.pr_json['base']['repo']['full_name']
end