pr-daikou 0.0.3 → 0.1.0

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: 6be7a8ad6e9d910f0a302a6f91f09111b4a466197565310417b1cc322b04b638
4
- data.tar.gz: 5a3b7e2e17b159770fd088411cf830a299aa9e326983340a1044d1f71d7279de
3
+ metadata.gz: 3a828cfb269e3369109142bc49697240bb9695aee9b7c7d078a49162d5f37bfc
4
+ data.tar.gz: d63c404811c00cab36fb9b23adaee885e31b0cf84312d129b126293118414ad3
5
5
  SHA512:
6
- metadata.gz: 6d45fb6bcef48183a9e834d658b0adb632cf72f0acd934e306a9bc116dda8b682f99e8cbb0f18ad8c60c3e017cd9165330fe1fca2d62069f0691467d7c316fc6
7
- data.tar.gz: fa287c5454ecb29ffb24bae2004cb920c578f06a340b0e26c68d9fe0114d380c93fb6034e722239bc3655dfd5ac76e55a5f1d8c4b07c417fa63769b5d757bb1d
6
+ metadata.gz: f01e9120952b6c4da84158b8f8d05b87617a486fed70c2d2d40d1c0679d41ca9ba5ddba67c69d57c1d97c42b8cc879127db803274362fae1aff72a247cf2b50b
7
+ data.tar.gz: ccb734f0a70c1f48792f83855b0d62fb484f32d8933bc1026fd44a073a46e9d029240e84906066671d065c450b4caf14dd5a67edefc19ba36644f02d61373a63
@@ -28,18 +28,18 @@ module PRDaikou
28
28
 
29
29
  private
30
30
 
31
- def parser
32
- @parser ||= OptionParser.new do |opt|
33
- opt.banner = 'Usage: pr-daikou [options]'
31
+ def parser
32
+ @parser ||= OptionParser.new do |opt|
33
+ opt.banner = 'Usage: pr-daikou [options]'
34
34
 
35
- opt.on('--email EMAIL', "git committed user email, default: #{@options[:email]}") {|v| @options[:email] = v }
36
- opt.on('--name NAME', "git committed user name, default: #{@options[:name]}") {|v| @options[:name] = v }
37
- opt.on('-T', '--title TITLE', "pull request title, default: #{@options[:title]} [at Mon Jan 1 12:34:56 UTC 2017]") {|v| @options[:title] = v }
38
- opt.on('--description DESC', "pull request description, default: #{@options[:description]}") {|v| @options[:description] = v }
39
- opt.on('-m', '--commit MESSAGE', "add git commit message, default: #{@options[:commit]}") {|v| @options[:commit] = v }
40
- opt.on('-b', '--base BRANCH', "pull request base branch, default: #{@options[:base]}") {|v| @options[:base] = v }
41
- opt.on('-t', '--topic BRANCH', "create new branch, default: #{@options[:topic]}_[20170101123456.000]") {|v| @options[:topic] = v }
42
- end
35
+ opt.on('--email EMAIL', "git committed user email, default: #{@options[:email]}") {|v| @options[:email] = v }
36
+ opt.on('--name NAME', "git committed user name, default: #{@options[:name]}") {|v| @options[:name] = v }
37
+ opt.on('-T', '--title TITLE', "pull request title, default: #{@options[:title]} [at Mon Jan 1 12:34:56 UTC 2017]") {|v| @options[:title] = v }
38
+ opt.on('--description DESC', "pull request description, default: #{@options[:description]}") {|v| @options[:description] = v }
39
+ opt.on('-m', '--commit MESSAGE', "add git commit message, default: #{@options[:commit]}") {|v| @options[:commit] = v }
40
+ opt.on('-b', '--base BRANCH', "pull request base branch, default: #{@options[:base]}") {|v| @options[:base] = v }
41
+ opt.on('-t', '--topic BRANCH', "create new branch, default: #{@options[:topic]}_[20170101123456.000]") {|v| @options[:topic] = v }
43
42
  end
43
+ end
44
44
  end
45
45
  end
@@ -8,11 +8,9 @@ module PRDaikou
8
8
  module_function
9
9
 
10
10
  def create_branch(email, username, new_branch, commit_message)
11
- `git config --local user.email "#{email}"`
12
- `git config --local user.name "#{username}"`
13
11
  `git checkout -b #{new_branch}`
14
12
  `git add .`
15
- `git commit -m "#{commit_message}"`
13
+ `GIT_AUTHOR_NAME=#{username} GIT_AUTHOR_EMAIL=#{email} GIT_COMMITTER_NAME=#{username} GIT_COMMITTER_EMAIL=#{email} git commit -m "#{commit_message}"`
16
14
  `git push #{repository_url} #{new_branch}`
17
15
  end
18
16
 
@@ -1,3 +1,3 @@
1
1
  module PRDaikou
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.1.0'.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.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rvillage
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-22 00:00:00.000000000 Z
11
+ date: 2018-06-01 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.6
63
+ rubygems_version: 2.7.7
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: Create GitHub PullRequest of code changes in CI Service