git-restart 0.0.8.dev → 0.0.9.dev
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git-restart/runner.rb +10 -8
- data/lib/git-restart/task.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75f5330e5092f1d4e22a9ad2439342eabc0b422d
|
4
|
+
data.tar.gz: bbbd2ec79c299cbc7d9e65c0ea0db6c37c9c5a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 286bd49c889435be2eda8c496a55521028e28cef0caf4fca1ae66ef7f8c76be30df78a1d2d633b6779ea15c6276782c5b25fea47d501f05465a4c0c53d43b335
|
7
|
+
data.tar.gz: 626c4ac82b10a21d9de2591811431276751c0472f080f572f3e3df0e8ae1a620f15b91a288a7ec2501142ad1565d1846bf70a68903bad7f71bf4e217f900c324
|
data/lib/git-restart/runner.rb
CHANGED
@@ -19,7 +19,7 @@ module GitRestart
|
|
19
19
|
attr_accessor :octokit
|
20
20
|
|
21
21
|
def current_commit()
|
22
|
-
@git.object("HEAD
|
22
|
+
@git.object("HEAD").sha;
|
23
23
|
end
|
24
24
|
def current_branch()
|
25
25
|
@git.current_branch();
|
@@ -65,15 +65,17 @@ module GitRestart
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def update_status(name, newStatus, message = nil)
|
68
|
-
#
|
68
|
+
puts "Task #{@name} assumed a new status: #{status}#{message ? " MSG:#{message}" : ""}"
|
69
69
|
|
70
|
-
|
71
|
-
|
70
|
+
return unless @octokit;
|
71
|
+
|
72
|
+
begin
|
73
|
+
@octokit.create_status(@repo, current_commit(), newStatus, {
|
72
74
|
context: "#{@name}/#{name}".gsub(" ", "_"),
|
73
75
|
description: message,
|
74
76
|
})
|
75
|
-
|
76
|
-
|
77
|
+
rescue
|
78
|
+
end
|
77
79
|
end
|
78
80
|
|
79
81
|
def _start_task_thread()
|
@@ -130,7 +132,7 @@ module GitRestart
|
|
130
132
|
def _start_next_tasks()
|
131
133
|
_generate_next_tasks();
|
132
134
|
|
133
|
-
puts "\
|
135
|
+
puts "\nStarting next tasks!"
|
134
136
|
@next_tasks.each do |name, t|
|
135
137
|
next unless t.active;
|
136
138
|
next unless t.triggered?
|
@@ -141,7 +143,7 @@ module GitRestart
|
|
141
143
|
end
|
142
144
|
|
143
145
|
def _switch_to(branch, commit = nil)
|
144
|
-
puts "\nSwitching to branch: #{branch}#{commit ? ",commit: #{commit}" : ""}"
|
146
|
+
puts "\n\nSwitching to branch: #{branch}#{commit ? ",commit: #{commit}" : ""}"
|
145
147
|
|
146
148
|
begin
|
147
149
|
@git.fetch();
|
data/lib/git-restart/task.rb
CHANGED