github-xcode-bot-builder 0.0.1 → 0.0.2
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/VERSION +1 -1
- data/github-xcode-bot-builder.gemspec +74 -0
- data/lib/bot_github.rb +9 -6
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 025fc7cf94b62444fa116202fc0475a23fec305f
|
4
|
+
data.tar.gz: 8950ead6f030b0948ad24ae2e016d59aa7899b62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c133b4e3d50fadd1bdfe93e797df23dae573378384d5dbd889570257112a71f248ddc817f4c27b6b9fa5756a9db27e0f1e05df8d3fd5155d4ba80d2690e52efb
|
7
|
+
data.tar.gz: 05cf0f1d4fd18975120452878e49c5bdff2129725d4b7ba281242171d7e48d2c25d0081873e5e4d318c8c3f5ba65a1e83b37d1115602b3b7927e1d635059aab4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "github-xcode-bot-builder"
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["ModCloth", "Two Bit Labs", "Geoffery Nix", "Todd Huss"]
|
12
|
+
s.date = "2013-12-13"
|
13
|
+
s.description = "A command line tool that can be run via cron that configures and manages Xcode server bots for each pull request"
|
14
|
+
s.email = ""
|
15
|
+
s.executables = ["bot-sync-github", "bot-devices", "bot-status", "bot-delete"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE",
|
18
|
+
"README.md"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".document",
|
22
|
+
".rspec",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"LICENSE",
|
26
|
+
"README.md",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"bin/bot-delete",
|
30
|
+
"bin/bot-devices",
|
31
|
+
"bin/bot-status",
|
32
|
+
"bin/bot-sync-github",
|
33
|
+
"github-xcode-bot-builder.gemspec",
|
34
|
+
"lib/bot_builder.rb",
|
35
|
+
"lib/bot_cli.rb",
|
36
|
+
"lib/bot_config.rb",
|
37
|
+
"lib/bot_github.rb",
|
38
|
+
"spec/github_xcode_bot_builder_spec.rb",
|
39
|
+
"spec/spec_helper.rb"
|
40
|
+
]
|
41
|
+
s.homepage = "http://github.com/ModCloth/github-xcode-bot-builder"
|
42
|
+
s.licenses = ["MIT"]
|
43
|
+
s.require_paths = ["lib"]
|
44
|
+
s.rubygems_version = "2.0.3"
|
45
|
+
s.summary = "Create Xcode bots to run when github pull requests are created or updated"
|
46
|
+
|
47
|
+
if s.respond_to? :specification_version then
|
48
|
+
s.specification_version = 4
|
49
|
+
|
50
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
|
+
s.add_runtime_dependency(%q<octokit>, ["~> 2.0"])
|
52
|
+
s.add_runtime_dependency(%q<parseconfig>, ["~> 1.0.2"])
|
53
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
54
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
55
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
56
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.7"])
|
57
|
+
else
|
58
|
+
s.add_dependency(%q<octokit>, ["~> 2.0"])
|
59
|
+
s.add_dependency(%q<parseconfig>, ["~> 1.0.2"])
|
60
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
61
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
64
|
+
end
|
65
|
+
else
|
66
|
+
s.add_dependency(%q<octokit>, ["~> 2.0"])
|
67
|
+
s.add_dependency(%q<parseconfig>, ["~> 1.0.2"])
|
68
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
69
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
70
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
71
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
data/lib/bot_github.rb
CHANGED
@@ -46,12 +46,10 @@ class BotGithub
|
|
46
46
|
# Build has passed or failed so update status and comment on the issue
|
47
47
|
create_comment_for_bot_status(pr, bot)
|
48
48
|
create_status(pr, github_state_new, convert_bot_status_to_github_description(bot), bot.status_url)
|
49
|
-
elsif (github_state_cur == :unknown)
|
49
|
+
elsif (github_state_cur == :unknown || user_requested_retest(pr, bot))
|
50
50
|
# Unknown state occurs when there's a new commit so trigger a new build
|
51
51
|
BotBuilder.instance.start_bot(bot.guid)
|
52
52
|
create_status_new_build(pr)
|
53
|
-
elsif (user_requested_retest(pr, bot))
|
54
|
-
BotBuilder.instance.start_bot(bot.guid)
|
55
53
|
else
|
56
54
|
puts "PR #{pr.number} (#{github_state_cur}) is up to date for bot #{bot.short_name}"
|
57
55
|
end
|
@@ -123,8 +121,13 @@ class BotGithub
|
|
123
121
|
def latest_github_state(pr)
|
124
122
|
statuses = @client.statuses(BotConfig.instance.github_repo, pr.sha)
|
125
123
|
status = OpenStruct.new
|
126
|
-
|
127
|
-
|
124
|
+
if (statuses.count == 0)
|
125
|
+
status.state = :unknown
|
126
|
+
status.updated_at = Time.now
|
127
|
+
else
|
128
|
+
status.state = statuses[0].state.to_sym
|
129
|
+
status.updated_at = statuses[0].updated_at
|
130
|
+
end
|
128
131
|
status
|
129
132
|
end
|
130
133
|
|
@@ -205,4 +208,4 @@ class BotGithub
|
|
205
208
|
('_' + github_repo + '_v').gsub(/[^[:alnum:]]/, '_')
|
206
209
|
end
|
207
210
|
|
208
|
-
end
|
211
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-xcode-bot-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ModCloth
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-12-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: octokit
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- bin/bot-devices
|
123
123
|
- bin/bot-status
|
124
124
|
- bin/bot-sync-github
|
125
|
+
- github-xcode-bot-builder.gemspec
|
125
126
|
- lib/bot_builder.rb
|
126
127
|
- lib/bot_cli.rb
|
127
128
|
- lib/bot_config.rb
|