circleci-bundle-update-pr 1.5.0 → 1.6.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
  SHA1:
3
- metadata.gz: ec15a9ea284e113041573a7ee82f8aad3e5ad3dc
4
- data.tar.gz: 9058ee5035d097cdb0e534a39072b2c1ef400023
3
+ metadata.gz: 3aa7059f82f00c21bc6821ad6296caf127e62c45
4
+ data.tar.gz: 4cd9648ded02350932d2aa906f12061386d5042c
5
5
  SHA512:
6
- metadata.gz: b0aaf83bd78161760d3aef76081e543e5660cd5b417b10e82acb3434ad815d7dadb5f33d09e358f0fad85ca8bd213cb47c76d6aff5432bfb69280d9880b37022
7
- data.tar.gz: fa8f7d28460191166be8daa72f3c9966e955b1823d634d1d592fac556dab0470ac1402733ca128e598e107e86dbe979cf532fe04c4651f8e5284702b133e86a4
6
+ metadata.gz: 2363dbe680a38acd166949516622a711a0907788f6027663e63c773b49e5a39e39c645324ff0626707f1a57eb7380da9b439531346f83398b7c283240b5c4707
7
+ data.tar.gz: cb18451b840d206f0c704c2fb749c3ee5ef9dab983fd13883d5d74044160d8fbe67cfdf074359bc072e3fdeb4eb96dd73e35f3d30586d1b4ed774eeac7474335
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- circleci-bundle-update-pr (1.5.0)
4
+ circleci-bundle-update-pr (1.6.0)
5
5
  compare_linker
6
6
  octokit (~> 3.8)
7
7
 
@@ -9,12 +9,12 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  addressable (2.3.8)
12
- compare_linker (1.3.0)
12
+ compare_linker (1.3.6)
13
13
  httpclient
14
14
  octokit
15
15
  faraday (0.9.2)
16
16
  multipart-post (>= 1.2, < 3)
17
- httpclient (2.8.2.4)
17
+ httpclient (2.8.3)
18
18
  multipart-post (2.0.0)
19
19
  octokit (3.8.0)
20
20
  sawyer (~> 0.6.0, >= 0.5.3)
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  rake (~> 10.0)
33
33
 
34
34
  BUNDLED WITH
35
- 1.13.1
35
+ 1.14.6
data/README.md CHANGED
@@ -42,8 +42,8 @@ deployment:
42
42
  commands:
43
43
  - |
44
44
  if [ "${BUNDLE_UPDATE}" ] ; then
45
- gem update bundler --no-document
46
- gem install circleci-bundle-update-pr
45
+ gem update bundler -N
46
+ gem install circleci-bundle-update-pr -N
47
47
  circleci-bundle-update-pr <username> <email>
48
48
  fi
49
49
  ```
@@ -18,7 +18,7 @@ module Circleci
18
18
  git_username ||= client.user.login
19
19
  git_email ||= "#{git_username}@users.noreply.github.com"
20
20
 
21
- create_branch(git_username, git_email, branch)
21
+ create_branch(git_username, git_email, branch, repo_full_name)
22
22
  pull_request = create_pull_request(repo_full_name, branch, now)
23
23
  add_comment_of_compare_linker(repo_full_name, pull_request[:number])
24
24
  end
@@ -32,13 +32,15 @@ module Circleci
32
32
  end
33
33
  private_class_method :need?
34
34
 
35
- def self.create_branch(git_username, git_email, branch)
35
+ def self.create_branch(git_username, git_email, branch, repo_full_name)
36
+ remote = "https://#{ENV["GITHUB_ACCESS_TOKEN"]}@github.com/#{repo_full_name}"
37
+ system("git remote add github-url-with-token #{remote}")
36
38
  system("git config user.name #{git_username}")
37
39
  system("git config user.email #{git_email}")
38
40
  system("git add Gemfile.lock")
39
41
  system("git commit -m '$ bundle update && bundle update --ruby'")
40
42
  system("git branch -M #{branch}")
41
- system("git push origin #{branch}")
43
+ system("git push github-url-with-token #{branch}")
42
44
  end
43
45
  private_class_method :create_branch
44
46
 
@@ -2,7 +2,7 @@ module Circleci
2
2
  module Bundle
3
3
  module Update
4
4
  module Pr
5
- VERSION = "1.5.0"
5
+ VERSION = "1.6.0"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: circleci-bundle-update-pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Masuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-09 00:00:00.000000000 Z
11
+ date: 2017-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.5.1
107
+ rubygems_version: 2.6.11
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Create GitHub PullRequest of bundle update in CircleCI