CiHelper 2.0 → 2.0.1
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/bitbucket_procedure.rb +1 -1
- data/lib/ci_helper/functions/base.rb +0 -2
- data/lib/ci_helper/functions/jenkin.rb +6 -18
- data/lib/ci_helper/functions/pull_request.rb +9 -9
- data/lib/ci_helper/main_process.rb +0 -1
- data/lib/ci_helper/redmine/issue_updater.rb +1 -1
- data/lib/ci_helper/version.rb +1 -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: 73d51eac14784319039deefb54c51d159a437f9a
|
4
|
+
data.tar.gz: 6836e4a0bcb44526b874db4532dba84c0f0889df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 352cf44afcf21ebf26d63bd533cb248a2a90c1914d2421eb367aaa5539599917f13efca306be4db9c908dfd4f01a1a5e1bbfa461b127c4008504008170b8789e
|
7
|
+
data.tar.gz: 70f0311cabca23c0e2b234d7ecaa3e6428966ea3ff993a65d46fcd892913b52486c4af1e313a2af80504f59c7e6eb4f7bf5be6695d695aab1feb0b9463185952
|
@@ -10,8 +10,6 @@ module CiHelper
|
|
10
10
|
@user_cli = CiHelper::UserCommandLineInterface.new
|
11
11
|
|
12
12
|
|
13
|
-
|
14
|
-
# @config = YAML.load_file("#{target}/#{CiHelper::CONFIG_FILE_NAME}")
|
15
13
|
@issue_monitor = IssueMonitor.new(config.ci_ac, config.ci_pass)
|
16
14
|
@bit_bucket_client = BitBucketProcedure.new(config.bit_ac, config.bit_pass)
|
17
15
|
@redmine_client = RedmineProcedure.new(config.redmine_ac, config.redmine_pass)
|
@@ -18,17 +18,14 @@ module CiHelper
|
|
18
18
|
|
19
19
|
if issue_monitor.success?
|
20
20
|
print_console_link
|
21
|
-
|
22
|
-
ask_user_pull_request_information
|
21
|
+
start_pull_request_function
|
23
22
|
# TODO: need to implement the updater_issue class, and then try auto update the issue status
|
24
23
|
# update_issue
|
25
24
|
else
|
26
25
|
print_fails
|
27
26
|
print_console_link
|
28
27
|
if user_cli.force_create_pull_request?
|
29
|
-
|
30
|
-
get_redmine_info
|
31
|
-
ask_user_pull_request_information
|
28
|
+
start_pull_request_function
|
32
29
|
# update_issue
|
33
30
|
end
|
34
31
|
end
|
@@ -44,19 +41,10 @@ module CiHelper
|
|
44
41
|
end
|
45
42
|
end
|
46
43
|
|
47
|
-
def
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
bit_bucket_client.add_user_description(user_cli.get_more_info)
|
52
|
-
bit_bucket_client.reviewers = user_cli.get_reviewers
|
53
|
-
bit_bucket_client.result = result
|
54
|
-
user_cli.waiting_for_creation
|
55
|
-
bit_bucket_client.create_pull_request(result)
|
56
|
-
sleep(0.5)
|
57
|
-
bit_bucket_client.go_to_pull_request_page
|
58
|
-
sleep(0.5)
|
59
|
-
puts "this is your pull request page : #{CiHelper::BITBUCKET_DOMAIN}#{bit_bucket_client.pull_request_page.link_with(class: 'execute').href}"
|
44
|
+
def start_pull_request_function
|
45
|
+
pull_request = CiHelper::Functions::PullRequest.new(config)
|
46
|
+
pull_request.branch_name = result.branch_name
|
47
|
+
pull_request.run
|
60
48
|
end
|
61
49
|
|
62
50
|
def print_console_link
|
@@ -2,22 +2,25 @@ module CiHelper
|
|
2
2
|
module Functions
|
3
3
|
class PullRequest < Base
|
4
4
|
|
5
|
+
attr_reader :branch_name
|
6
|
+
|
5
7
|
def run
|
6
|
-
bit_bucket_client.branch_name = user_cli.get_branch_name
|
8
|
+
bit_bucket_client.branch_name = branch_name || user_cli.get_branch_name
|
7
9
|
|
8
10
|
if bit_bucket_client.multiple_issues?
|
9
11
|
bit_bucket_client.pf_title = user_cli.customize_title
|
10
12
|
else
|
11
|
-
|
13
|
+
redmine_client.issue_no = bit_bucket_client.issue_numbers.first
|
12
14
|
bit_bucket_client.pf_title = redmine_client.issue.description
|
15
|
+
user_cli.print_target(redmine_client.issue.target_version)
|
13
16
|
end
|
14
17
|
|
15
18
|
bit_bucket_client.add_destination(user_cli.get_destination)
|
16
19
|
bit_bucket_client.add_user_description(user_cli.get_more_info)
|
17
20
|
bit_bucket_client.reviewers = user_cli.get_reviewers
|
18
21
|
user_cli.waiting_for_creation
|
19
|
-
|
20
22
|
bit_bucket_client.create_pull_request
|
23
|
+
|
21
24
|
sleep(0.5)
|
22
25
|
bit_bucket_client.go_to_pull_request_page
|
23
26
|
sleep(0.5)
|
@@ -25,13 +28,10 @@ module CiHelper
|
|
25
28
|
puts "this is your pull request page : #{CiHelper::BITBUCKET_DOMAIN}#{bit_bucket_client.pull_request_page.link_with(class: 'execute').href}"
|
26
29
|
end
|
27
30
|
|
28
|
-
|
29
|
-
|
30
|
-
def get_redmine_info
|
31
|
-
redmine_client.issue_no = bit_bucket_client.issue_numbers.first
|
32
|
-
redmine_client.login
|
33
|
-
redmine_client.set_issue_form
|
31
|
+
def branch_name=(name)
|
32
|
+
@branch_name = name
|
34
33
|
end
|
34
|
+
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -50,7 +50,7 @@ module CiHelper
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def target_version
|
53
|
-
target_version_select_list.options.select{ |option| option.value == target_version_select_list.value }
|
53
|
+
target_version_select_list.options.select{ |option| option.value == target_version_select_list.value }.first.text
|
54
54
|
end
|
55
55
|
|
56
56
|
def submit
|
data/lib/ci_helper/version.rb
CHANGED