souls 1.8.10 → 1.8.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/souls/cli/github/index.rb +11 -3
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- 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: 6c1ba3aa74c5c645b4b967cd05f5a7c6b5b162a49da104325af8d97f0e9b47c2
|
4
|
+
data.tar.gz: a8963851cfe5a371b6d32a33e0c0eb7ab432de32629c133e70780c87d240d9f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 230fb2d6dc29cfce296e74e98b84081de18aac2ab47a4252ffd0f795d508f897786455ce926cbd346638c1e0aa3cb128a833934ccf84513a36f5814fb4d81d2a
|
7
|
+
data.tar.gz: 0b503f9f9a4d5c2966af65092a5e352a8b5250ef6cea7eae2b2c3e5664543efcbd9ac9631f63a08ca7f4cd7ef97dab5625ba2f901a50c619b53774e501e21918
|
@@ -30,10 +30,18 @@ module Souls
|
|
30
30
|
|
31
31
|
desc "watch", "Watch GitHub Actions Workflow"
|
32
32
|
def watch
|
33
|
-
|
33
|
+
remote_url = `git remote get-url origin`
|
34
|
+
split_url = %r{\A(git@github.com:)(.+/.+)(\.git)}.match(remote_url)
|
35
|
+
if split_url.nil? || split_url.size != 4
|
36
|
+
raise(CLIException, "Cannot access Github, please check your credentials")
|
37
|
+
end
|
38
|
+
|
39
|
+
api_request = "gh api -X GET 'repos/#{split_url[2]}/actions/runs'"
|
34
40
|
workflows = JSON.parse(`#{api_request}`)
|
35
41
|
|
36
|
-
|
42
|
+
if workflows.nil? || !workflows.key?("workflow_runs")
|
43
|
+
raise(CLIException, "Failed to parse JSON response from Github")
|
44
|
+
end
|
37
45
|
|
38
46
|
wf_info =
|
39
47
|
workflows["workflow_runs"].filter_map do |wf|
|
@@ -43,7 +51,7 @@ module Souls
|
|
43
51
|
wf_id =
|
44
52
|
case wf_info.size
|
45
53
|
when 0
|
46
|
-
raise(CLIException, "No workflow is running
|
54
|
+
raise(CLIException, "No workflow is running")
|
47
55
|
when 1
|
48
56
|
wf_info[0].values[0]
|
49
57
|
else
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.8.
|
1
|
+
1.8.12
|
@@ -1 +1 @@
|
|
1
|
-
1.8.
|
1
|
+
1.8.12
|