pr-daikou 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/pr-daikou.rb +10 -7
- data/lib/pr-daikou/cli.rb +10 -8
- data/lib/pr-daikou/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 541d3afad0b28742d5a9c5694ff9e35f40bb2bac8b9a0ec5c89b135f9b6e72e5
|
4
|
+
data.tar.gz: cd3d339778a08aadd44fdedef6fcf4a905c67144fd29c4ee8b761e01147e6175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7d7a4d989266db38b13742c7d5f66942489e5b3aa3451565c280e4122995866170d0a4c2d84df28080b512ba38375db32adb6d8b1c094518eb15037dca5e03d
|
7
|
+
data.tar.gz: 35b69a5790768e4598539811bfdb087242f1d58c3bc80376425da3b3cdddbfcef2c18d87e2e520dcf06fafa3514739392313226cbbe01d38def29c02454e1607
|
data/README.md
CHANGED
@@ -83,6 +83,7 @@ Usage: pr-daikou [options]
|
|
83
83
|
-b, --base BRANCH pull request base branch, default: master
|
84
84
|
-t, --topic BRANCH create new branch, default: ci/pr-daikou_[20170101123456.000]
|
85
85
|
-L, --labels LABELS add labels, which should be separated with comma, default: ""
|
86
|
+
-P, --only-pullrequest Create Pull requests, default: false
|
86
87
|
```
|
87
88
|
|
88
89
|
## Contributing
|
data/lib/pr-daikou.rb
CHANGED
@@ -12,14 +12,17 @@ module PRDaikou
|
|
12
12
|
raise 'Please input ENV of GITHUB_ACCESS_TOKEN'
|
13
13
|
end
|
14
14
|
|
15
|
-
|
15
|
+
unless options[:only_pullrequest]
|
16
|
+
return unless code_changed?
|
17
|
+
|
18
|
+
PRDaikou::Host::Github.create_branch(
|
19
|
+
options[:email],
|
20
|
+
options[:name],
|
21
|
+
topic_branch(options[:topic], current_time),
|
22
|
+
options[:commit]
|
23
|
+
)
|
24
|
+
end
|
16
25
|
|
17
|
-
PRDaikou::Host::Github.create_branch(
|
18
|
-
options[:email],
|
19
|
-
options[:name],
|
20
|
-
topic_branch(options[:topic], current_time),
|
21
|
-
options[:commit]
|
22
|
-
)
|
23
26
|
pullrequest_number =
|
24
27
|
PRDaikou::Host::Github.create_pullrequest(
|
25
28
|
pullrequest_title(options[:title]),
|
data/lib/pr-daikou/cli.rb
CHANGED
@@ -11,14 +11,15 @@ module PRDaikou
|
|
11
11
|
|
12
12
|
def initialize
|
13
13
|
@options = {
|
14
|
-
commit:
|
15
|
-
title:
|
16
|
-
description:
|
17
|
-
email:
|
18
|
-
name:
|
19
|
-
base:
|
20
|
-
topic:
|
21
|
-
labels:
|
14
|
+
commit: ':robot: PR daikou',
|
15
|
+
title: 'PR daikou',
|
16
|
+
description: '',
|
17
|
+
email: 'pr_daikou@example.com',
|
18
|
+
name: 'pr_daikou',
|
19
|
+
base: 'master',
|
20
|
+
topic: 'ci/pr-daikou',
|
21
|
+
labels: '',
|
22
|
+
only_pullrequest: false
|
22
23
|
}
|
23
24
|
end
|
24
25
|
|
@@ -41,6 +42,7 @@ module PRDaikou
|
|
41
42
|
opt.on('-b', '--base BRANCH', "pull request base branch, default: #{@options[:base]}") {|v| @options[:base] = v }
|
42
43
|
opt.on('-t', '--topic BRANCH', "create new branch, default: #{@options[:topic]}_[20170101123456.000]") {|v| @options[:topic] = v }
|
43
44
|
opt.on('-L', '--labels LABELS', "add labels, which should be separated by comma, default: #{@options[:labels]}") {|v| @options[:labels] = v }
|
45
|
+
opt.on('-P', '--only-pullrequest', "Create Pull requests, default: #{@options[:only_pullrequest]}") {|_v| @options[:only_pullrequest] = true }
|
44
46
|
end
|
45
47
|
end
|
46
48
|
end
|
data/lib/pr-daikou/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pr-daikou
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rvillage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
62
|
rubyforge_project:
|
63
|
-
rubygems_version: 2.7.
|
63
|
+
rubygems_version: 2.7.8
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Create GitHub PullRequest of code changes in CI Service
|