octopolo 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.markdown +5 -0
- data/lib/octopolo/github/label.rb +1 -4
- data/lib/octopolo/scripts/issue.rb +0 -3
- data/lib/octopolo/version.rb +1 -1
- data/spec/octopolo/github/label_spec.rb +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cda31d965fb45d75ae197ea4343da56736f69f9
|
4
|
+
data.tar.gz: 6e3dbbe248ff7c975bdbad6ee696fe30843da062
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3edb4de1696405e53dde4d3abe2fc387856cd42ddac0c847d6ad4ec1e23f65f7fa3ea13d2ab2b33acdd412269c0099bbd9a61760830172dc41f20afa941fe6dd
|
7
|
+
data.tar.gz: 206579ef9b311236170a6813707351b2288dc5efe82df1a7cc6377b9f1ab585b1447968baf7a0dff353f31e4b28f30258e8c24fdc3964d24ca39596db58f871d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
ruby-2.3.0
|
data/CHANGELOG.markdown
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "yaml"
|
2
2
|
require "octokit"
|
3
|
-
require "pry"
|
4
3
|
|
5
4
|
module Octopolo
|
6
5
|
module GitHub
|
@@ -38,7 +37,6 @@ module Octopolo
|
|
38
37
|
#
|
39
38
|
# label - a label object
|
40
39
|
def self.first_or_create(label)
|
41
|
-
# binding.pry
|
42
40
|
unless all_from_repo.include?(label)
|
43
41
|
GitHub.add_label(config.github_repo, label.name, label.color)
|
44
42
|
end
|
@@ -58,10 +56,9 @@ module Octopolo
|
|
58
56
|
#
|
59
57
|
# returns - an array of labels
|
60
58
|
def self.all_from_repo
|
61
|
-
GitHub.labels(config.github_repo).map{ |label_hash| new(label_hash) }
|
59
|
+
GitHub.labels(config.github_repo, per_page: 100).map{ |label_hash| new(label_hash) }
|
62
60
|
end
|
63
61
|
private_class_method :all_from_repo
|
64
|
-
|
65
62
|
end
|
66
63
|
end
|
67
64
|
end
|
@@ -5,7 +5,6 @@ require_relative "../github/issue_creator"
|
|
5
5
|
require_relative "../pivotal/story_commenter"
|
6
6
|
require_relative "../jira/story_commenter"
|
7
7
|
require_relative "../question"
|
8
|
-
require "pry"
|
9
8
|
|
10
9
|
module Octopolo
|
11
10
|
module Scripts
|
@@ -73,8 +72,6 @@ module Octopolo
|
|
73
72
|
end
|
74
73
|
end
|
75
74
|
|
76
|
-
# binding.pry
|
77
|
-
|
78
75
|
self.labels
|
79
76
|
end
|
80
77
|
protected :ask_labels
|
data/lib/octopolo/version.rb
CHANGED
@@ -15,7 +15,8 @@ module Octopolo
|
|
15
15
|
subject { Label }
|
16
16
|
|
17
17
|
before do
|
18
|
-
subject.config = config
|
18
|
+
subject.config = config
|
19
|
+
allow(GitHub).to receive(:labels).and_return(labels_hash)
|
19
20
|
end
|
20
21
|
|
21
22
|
context "#initialize" do
|
@@ -27,20 +28,17 @@ module Octopolo
|
|
27
28
|
|
28
29
|
context "#all_labels" do
|
29
30
|
it "gets and returns all labels belonging to a repository" do
|
30
|
-
allow(GitHub).to receive(:labels).and_return(labels_hash)
|
31
31
|
expect(Label.all).to eq([label1,label2])
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
context "#first_or_create" do
|
36
36
|
it "finds the existing label and doesn't do anything" do
|
37
|
-
allow(Label).to receive(:all_from_repo).and_return([label1,label2])
|
38
37
|
expect(GitHub).not_to receive(:add_label)
|
39
38
|
Label.first_or_create(label1)
|
40
39
|
end
|
41
40
|
|
42
41
|
it "doesn't find a label and creates one" do
|
43
|
-
allow(Label).to receive(:all_from_repo).and_return([label1,label2])
|
44
42
|
expect(GitHub).to receive(:add_label).with(config.github_repo, "medium-risk", "454545")
|
45
43
|
Label.first_or_create(Label.new(name: "medium-risk", color: "454545"))
|
46
44
|
end
|
@@ -56,7 +54,6 @@ module Octopolo
|
|
56
54
|
end
|
57
55
|
end
|
58
56
|
|
59
|
-
|
60
57
|
context "#build_label_array" do
|
61
58
|
it "returns an array of label when given a label" do
|
62
59
|
allow(Label).to receive(:first_or_create)
|
@@ -84,6 +81,12 @@ module Octopolo
|
|
84
81
|
expect(Label.get_names([label1,label2])).to eq(["low-risk","high-risk"])
|
85
82
|
end
|
86
83
|
end
|
84
|
+
|
85
|
+
describe "#all_from_repo" do
|
86
|
+
it "should list all repos" do
|
87
|
+
expect(Label.send(:all_from_repo)).to eq([label1, label2])
|
88
|
+
end
|
89
|
+
end
|
87
90
|
end
|
88
91
|
end
|
89
92
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Byrne
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-09-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gli
|