CiHelper 2.1.1 → 2.1.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/lib/ci_helper.rb +1 -0
- data/lib/ci_helper/bitbucket_procedure.rb +0 -1
- data/lib/ci_helper/functions/pull_request.rb +1 -1
- data/lib/ci_helper/functions/redmine.rb +1 -0
- data/lib/ci_helper/main_process.rb +6 -6
- data/lib/ci_helper/redmine/issue_updater.rb +16 -0
- data/lib/ci_helper/user_command_line_interface.rb +12 -6
- data/lib/ci_helper/version.rb +1 -1
- metadata +10 -10
- data/lib/ci_helper/formatter/common.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d735063c261bde7b5a4e178da68be89e7bcabee8
|
4
|
+
data.tar.gz: c45bf59c95be4bba48e4c5ad484b7253e94d91d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3931544d48068c8c0eaf68a2b34eb903d22cebcd50f825d56da74c46ca1358129c6a46dcd5a49c3a0c467ce099d125e45a4902dcbb1ee776d474e3eee482f6a
|
7
|
+
data.tar.gz: 3391b1eb896c6e38e4144e1290e939199150092b76c709dbf51df91d2f2733c0829d9645fee861cdca252bd07aa83fc0e4d391f59f71b8bce0c8ddd851e7b14c
|
data/lib/ci_helper.rb
CHANGED
@@ -15,7 +15,7 @@ module CiHelper
|
|
15
15
|
else
|
16
16
|
redmine_client.issue_no = bit_bucket_client.issue_numbers.first
|
17
17
|
bit_bucket_client.pf_title = redmine_client.issue.description
|
18
|
-
user_cli.print_target(redmine_client.issue.
|
18
|
+
user_cli.print_target(redmine_client.issue.target_branch)
|
19
19
|
end
|
20
20
|
|
21
21
|
create_pull_request
|
@@ -23,7 +23,7 @@ module CiHelper
|
|
23
23
|
def run
|
24
24
|
|
25
25
|
while true
|
26
|
-
begin
|
26
|
+
# begin
|
27
27
|
@option = user_cli.get_user_choose
|
28
28
|
|
29
29
|
if ci_monitor?
|
@@ -35,11 +35,11 @@ module CiHelper
|
|
35
35
|
else
|
36
36
|
puts 'Please dont act like a monkey'
|
37
37
|
end
|
38
|
-
rescue => e
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
38
|
+
# rescue => e
|
39
|
+
# puts 'You may enter wrong ticket, branch name or face a internet problem'
|
40
|
+
# puts e.message
|
41
|
+
# puts "If you think is a bug please go to create a issue for me #{CiHelper::BUG_REPORT_URL}"
|
42
|
+
# end
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -53,6 +53,14 @@ module CiHelper
|
|
53
53
|
target_version_select_list.options.select{ |option| option.value == target_version_select_list.value }.first.text
|
54
54
|
end
|
55
55
|
|
56
|
+
def target_branch
|
57
|
+
target_branch_select_list.options.select{ |option| option.value == target_branch_select_list.value }.first.text
|
58
|
+
end
|
59
|
+
|
60
|
+
def spend_time=(time)
|
61
|
+
time_entry_hours.value = time
|
62
|
+
end
|
63
|
+
|
56
64
|
def submit
|
57
65
|
# need to handle the submit success or not
|
58
66
|
fail Exceptions::SettingError, 'Please set your form before use it' unless form
|
@@ -78,6 +86,14 @@ module CiHelper
|
|
78
86
|
form.field_with(name: 'issue[fixed_version_id]')
|
79
87
|
end
|
80
88
|
|
89
|
+
def target_branch_select_list
|
90
|
+
form.field_with(name: 'issue[custom_field_values][8]')
|
91
|
+
end
|
92
|
+
|
93
|
+
def time_entry_hours
|
94
|
+
form.field_with(name: 'time_entry[hours]')
|
95
|
+
end
|
96
|
+
|
81
97
|
private
|
82
98
|
|
83
99
|
# TODO: not implement yet
|
@@ -1,7 +1,6 @@
|
|
1
|
-
require 'ci_helper/formatter/common'
|
2
1
|
module CiHelper
|
3
2
|
class UserCommandLineInterface
|
4
|
-
|
3
|
+
|
5
4
|
|
6
5
|
# TODO : need to move to bitbucket related setting to let user set
|
7
6
|
REVIEWERS = ['anna_ho_2014', 'cherylyu_jcm',
|
@@ -110,12 +109,18 @@ module CiHelper
|
|
110
109
|
end
|
111
110
|
end
|
112
111
|
|
112
|
+
def get_spent_time
|
113
|
+
get_user_input do
|
114
|
+
puts spend_time_question
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
113
118
|
def waiting_for_creation
|
114
119
|
puts 'Please move your finger away from the enter, and dont keep pushing the fuckkkkkkking enter, I am creating the pf >.^ '
|
115
120
|
end
|
116
121
|
|
117
122
|
def print_target(target)
|
118
|
-
puts "This is your target
|
123
|
+
puts "This is your target branch #{target}\n"
|
119
124
|
end
|
120
125
|
|
121
126
|
private
|
@@ -133,10 +138,7 @@ module CiHelper
|
|
133
138
|
reviewer = []
|
134
139
|
choosen_key.each do |value|
|
135
140
|
if value.to_i == CiHelper::DANGEROUS
|
136
|
-
|
137
141
|
print_ngyan_cat
|
138
|
-
puts "\n"
|
139
|
-
print_horse_format
|
140
142
|
fail Exceptions::SettingError, 'Please dont choose Ciao Bao its dangerous !!!!!!!'
|
141
143
|
end
|
142
144
|
|
@@ -209,5 +211,9 @@ please input 1, 2 or 3"
|
|
209
211
|
def update_issue_question
|
210
212
|
'Do you want me update the issue for you to ut passed ?'
|
211
213
|
end
|
214
|
+
|
215
|
+
def spend_time_question
|
216
|
+
'Please input your spent time'
|
217
|
+
end
|
212
218
|
end
|
213
219
|
end
|
data/lib/ci_helper/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CiHelper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Yu
|
@@ -14,42 +14,42 @@ dependencies:
|
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mechanize
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '2.7'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.7'
|
55
55
|
description: In house tool only for JCM team
|
@@ -68,7 +68,6 @@ files:
|
|
68
68
|
- lib/ci_helper/cli.rb
|
69
69
|
- lib/ci_helper/constants.rb
|
70
70
|
- lib/ci_helper/exceptions.rb
|
71
|
-
- lib/ci_helper/formatter/common.rb
|
72
71
|
- lib/ci_helper/functions.rb
|
73
72
|
- lib/ci_helper/functions/base.rb
|
74
73
|
- lib/ci_helper/functions/jenkin.rb
|
@@ -97,12 +96,12 @@ require_paths:
|
|
97
96
|
- lib
|
98
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
98
|
requirements:
|
100
|
-
- -
|
99
|
+
- - '>='
|
101
100
|
- !ruby/object:Gem::Version
|
102
101
|
version: '0'
|
103
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
103
|
requirements:
|
105
|
-
- -
|
104
|
+
- - '>='
|
106
105
|
- !ruby/object:Gem::Version
|
107
106
|
version: '0'
|
108
107
|
requirements: []
|
@@ -112,3 +111,4 @@ signing_key:
|
|
112
111
|
specification_version: 4
|
113
112
|
summary: A crawler to get the result form CI
|
114
113
|
test_files: []
|
114
|
+
has_rdoc:
|
@@ -1,51 +0,0 @@
|
|
1
|
-
module CiHelper
|
2
|
-
module Formatter
|
3
|
-
module Common
|
4
|
-
def budddha
|
5
|
-
#
|
6
|
-
# [
|
7
|
-
# " _oo8oo_",
|
8
|
-
# " o8888888o",
|
9
|
-
# " 88' . '88",
|
10
|
-
# " (| -_- |)",
|
11
|
-
# " 0\ = /0",
|
12
|
-
# " ___/'==='\___ where is my mom mom ? ",
|
13
|
-
# " ' \\| | '.",
|
14
|
-
# " / \\||| : ||| \"",
|
15
|
-
# " / _||||| -:- |||||_ \"",
|
16
|
-
# " | | \\\ - / | | "",
|
17
|
-
# " | \_| ''\---/ '' |_/ |",
|
18
|
-
# " \ .-\__ '-' __/-. /"",
|
19
|
-
# ___'. .' /--.--\ '. .'___
|
20
|
-
# ."" '< '.___\_<|>_/___.' >' "".
|
21
|
-
# | | : `- \`.:`\ _ /`:.`/ -` : | |
|
22
|
-
# \ \ `-. \_ __\ /__ _/ .-` / /
|
23
|
-
# =====`-.____`.___ \_____/ ___.`____.-`=====
|
24
|
-
# `=---=`
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
end
|
29
|
-
|
30
|
-
def print_horse_format
|
31
|
-
puts horse_formatter.join("\n")
|
32
|
-
end
|
33
|
-
|
34
|
-
def horse_formatter
|
35
|
-
[
|
36
|
-
" where is my mommom ?",
|
37
|
-
"\\",
|
38
|
-
"\\ ^___^",
|
39
|
-
" \\ (O O) \\______________",
|
40
|
-
" (___) \\ ) \\/\\",
|
41
|
-
" || -----------w | ",
|
42
|
-
" || | |",
|
43
|
-
" || | \\",
|
44
|
-
" ######### ########"
|
45
|
-
]
|
46
|
-
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|