lib/octopolo/github/label.rb in octopolo-1.7.0 vs lib/octopolo/github/label.rb in octopolo-1.7.1
- old
+ new
@@ -1,8 +1,7 @@
require "yaml"
require "octokit"
-require "pry"
module Octopolo
module GitHub
class Label
extend ConfigWrapper
@@ -36,11 +35,10 @@
# Public: Checks to see if label exists on remote, if not makes one.
#
# label - a label object
def self.first_or_create(label)
- # binding.pry
unless all_from_repo.include?(label)
GitHub.add_label(config.github_repo, label.name, label.color)
end
end
@@ -56,12 +54,11 @@
# Private: Gets all the labels from given repository on github
#
# returns - an array of labels
def self.all_from_repo
- GitHub.labels(config.github_repo).map{ |label_hash| new(label_hash) }
+ GitHub.labels(config.github_repo, per_page: 100).map{ |label_hash| new(label_hash) }
end
private_class_method :all_from_repo
-
end
end
end