build-buddy 1.8.0 → 1.8.4
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/lib/build_buddy.rb +1 -1
- data/lib/build_buddy/gitter.rb +2 -2
- data/lib/build_buddy/server.rb +1 -1
- data/lib/build_buddy/slacker.rb +5 -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: 656443f17239c6954ec716ef56dce64a6ad0a33b
|
4
|
+
data.tar.gz: bf937f8268594356e0bfc79bcbb6163a4134e386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a04a74c2e86297a87a5f0ec98ede406e05456073479d661edd298c90df868ffc896b5b1aa4078f7e8858a2df6d5d3286434c8e60f9eacfcb3ab80db5af269994
|
7
|
+
data.tar.gz: 0f45e9e4bb55b51107369dad1555f3074dd6b04273c24721f72cf8b12b7c4b55cc089bb0174f85c7cf8b0f098c26dbc8e364d1fb9a676dff23eca3702820b1a8
|
data/lib/build_buddy.rb
CHANGED
data/lib/build_buddy/gitter.rb
CHANGED
@@ -14,7 +14,7 @@ module BuildBuddy
|
|
14
14
|
info "Connected to Github"
|
15
15
|
end
|
16
16
|
|
17
|
-
def set_status(repo_full_name, repo_sha,
|
17
|
+
def set_status(repo_full_name, repo_sha, state, description, target_url)
|
18
18
|
options = {
|
19
19
|
:description => description.length > 140 ? "#{description[0..136]}..." : description,
|
20
20
|
:context => 'build-buddy'
|
@@ -22,7 +22,7 @@ module BuildBuddy
|
|
22
22
|
unless target_url.nil?
|
23
23
|
options[:target_url] = target_url
|
24
24
|
end
|
25
|
-
@gh_client.create_status(repo_full_name, repo_sha,
|
25
|
+
@gh_client.create_status(repo_full_name, repo_sha, state.to_s, options)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
data/lib/build_buddy/server.rb
CHANGED
@@ -27,8 +27,8 @@ module BuildBuddy
|
|
27
27
|
request.respond 500, "Signatures didn't match!"
|
28
28
|
else
|
29
29
|
payload = JSON.parse(payload_text)
|
30
|
+
action = payload['action']
|
30
31
|
pull_request = payload['pull_request']
|
31
|
-
pull_request_action = pull_request['action']
|
32
32
|
|
33
33
|
case action
|
34
34
|
when 'opened', 'reopened', 'synchronize'
|
data/lib/build_buddy/slacker.rb
CHANGED
@@ -269,15 +269,15 @@ Ask me `what happened` to get a list of recent builds and log files and `what op
|
|
269
269
|
def notify_channel(build_data)
|
270
270
|
status_message = build_data.termination_type == :killed ? "was stopped" : build_data.exit_code != 0 ? "failed" : "succeeded"
|
271
271
|
status_message += '. '
|
272
|
+
log_url = Config.server_base_uri + '/log/' + build_data._id.to_s
|
272
273
|
|
273
274
|
if build_data.type == :pull_request
|
274
|
-
message = "
|
275
|
-
|
276
|
-
|
277
|
-
Celluloid::Actor[:gitter].async.set_status(build_data.repo_full_name, build_data.repo_sha, git_status, git_message, git_url)
|
275
|
+
message = "Build #{status_message}"
|
276
|
+
git_state = (build_data.termination_type == :killed ? :failure : build_data.exit_code != 0 ? :error : :success)
|
277
|
+
Celluloid::Actor[:gitter].async.set_status(build_data.repo_full_name, build_data.repo_sha, git_state, message, log_url)
|
278
278
|
info "Pull request build #{status_message}"
|
279
279
|
else
|
280
|
-
status_message += "Log file at #{
|
280
|
+
status_message += "Log file at #{log_url}."
|
281
281
|
if build_data.type == :master
|
282
282
|
message = "A build of the `master` branch #{status_message}"
|
283
283
|
info "`master` branch build #{status_message}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-buddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Lyon-smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: timers
|