ci_toolkit 1.4.8 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ci_toolkit/bitrise_client.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df7f5bba49c6c9e1161a6c7d5169173557d6a9f26e42936f92fcde54033563d1
|
4
|
+
data.tar.gz: a56c807056f491f5b08502ad54c5cc70139733be8119ad3bedd8f50fe795a3b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3f63b8e2454b4f9af57a82f99ae6c7c2bb62e39ae87d60246f5d9ad1d1163671af6d975437cacdeef62a788128c910890e77eb27725388f926a608a416c0da4
|
7
|
+
data.tar.gz: 84b8beecd8f3bf472aace619789500d10b0116b1b4b6b11b05039a0ee410ba9cc44cd34f9d9eab8863fc80117bd5e3bf4409a61d77d879d6a52e2d61b02ac8a1
|
data/Gemfile.lock
CHANGED
@@ -49,7 +49,7 @@ module CiToolkit
|
|
49
49
|
})
|
50
50
|
end
|
51
51
|
|
52
|
-
def abort_pull_request_builds(pull_request, branch, commit)
|
52
|
+
def abort_pull_request_builds(pull_request, branch, commit = nil)
|
53
53
|
find_pull_request_builds(pull_request, branch, commit).each do |build|
|
54
54
|
@connection.post("/#{API_VERSION}/apps/#{@app_slug}/builds/#{build["slug"]}/abort", {
|
55
55
|
abort_reason: "Aborting due to other build failed for pull request #{pull_request}"
|
@@ -57,14 +57,15 @@ module CiToolkit
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
def find_pull_request_builds(pull_request, branch, commit)
|
60
|
+
def find_pull_request_builds(pull_request, branch, commit = nil)
|
61
61
|
response = @connection.get("/#{API_VERSION}/apps/#{@app_slug}/builds", {
|
62
62
|
branch: branch,
|
63
63
|
pull_request_id: pull_request.to_i,
|
64
64
|
status: 0 # status: 0 == not finished
|
65
65
|
})
|
66
|
-
builds = response.body["data"]
|
67
|
-
filter_builds_by_commit(builds, commit)
|
66
|
+
builds = response.body["data"] || []
|
67
|
+
builds = filter_builds_by_commit(builds, commit) unless commit.nil?
|
68
|
+
builds
|
68
69
|
end
|
69
70
|
|
70
71
|
def filter_builds_by_commit(builds, commit)
|