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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e0c76dd51e728fa960e9b8f21242638b6c5f5cf9f46489a1dd088ecec263f34
4
- data.tar.gz: 857f2a0fbeb3242664b8d9cea8417fcab648862975b77b58fdd98cf93509ee52
3
+ metadata.gz: 541d3afad0b28742d5a9c5694ff9e35f40bb2bac8b9a0ec5c89b135f9b6e72e5
4
+ data.tar.gz: cd3d339778a08aadd44fdedef6fcf4a905c67144fd29c4ee8b761e01147e6175
5
5
  SHA512:
6
- metadata.gz: e4fd6ead491ae0626f91941187a9f6e5e4fadaf1622a3216781349ea3838659fa851af0e47553aebd6f470b358a8f0524c3045577037dd6ca2676ab7fb7a0c39
7
- data.tar.gz: 7985e540a5992e51288a941918ae53244ffd4cdeda26dc2b8584d24e3953bd1f337d0bfbdbcf75b09b802893021e25cfe6004adad1914e56cbcc8f75781ca2a5
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
@@ -12,14 +12,17 @@ module PRDaikou
12
12
  raise 'Please input ENV of GITHUB_ACCESS_TOKEN'
13
13
  end
14
14
 
15
- return unless code_changed?
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]),
@@ -11,14 +11,15 @@ module PRDaikou
11
11
 
12
12
  def initialize
13
13
  @options = {
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: ''
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
@@ -1,3 +1,3 @@
1
1
  module PRDaikou
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.3.1'.freeze
3
3
  end
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.2.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-10-01 00:00:00.000000000 Z
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.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