dependanot 0.1.7 → 0.1.8

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: 2107d2fc9ef2ce61680a0a62bbb248548e91dea25ac4c05e2c426197fb0aebc6
4
- data.tar.gz: 965595379cb72610d767afcbab36a51891aa1f0a4be7ae83b9e6437a802f36b4
3
+ metadata.gz: be037e679b83203c393bc46caa305527117b537d328ccbee885db63c02bc36da
4
+ data.tar.gz: cf1ad286d01c682b2f5d4a6f3ed5914220d10fef35053ce2c09c4f2b2c845296
5
5
  SHA512:
6
- metadata.gz: 2ea7a9dac327b8ff470db6392f6734bef39e71b41665d1f1d350bcdb0adb3093627ed0ad1d5e1cc16fd08745ab088fe9e2f7f9b7098e825ac7abc47dbfba2c5d
7
- data.tar.gz: 6a29693a707725fcec357cc453a9f33bf9a329ec9947e23ba893f87f0acd8aad5ca41221a805d83b8f957393129ef33e0a4c0db38d84a9d26f6e245361cf2de3
6
+ metadata.gz: 174ff5b97891e0b2888ba0b2de5bed6b5d3690f9547d0fc87452fa5eb3c822eb82293857af4cac8b0d638fb3ddbed7b8cd00fe20d5211fa72bf5827639b30f3e
7
+ data.tar.gz: e184234e28d33d1c1fbdb06693dfa175745c9a864cb80ac7a987aa1a2b3d2ac25d8aea96a9f79e7c74b0c10b3a17df2e8424bb80ca61f1b6d1be127f911a3151
@@ -5,7 +5,6 @@ module Dependabot
5
5
  attr_reader :repo
6
6
 
7
7
  def initialize(path)
8
- @path = path
9
8
  @repo = Rugged::Repository.discover(path)
10
9
  end
11
10
 
@@ -16,6 +15,10 @@ module Dependabot
16
15
 
17
16
  def push(remote: "origin", branch: "HEAD")
18
17
  repo.push(remote, ["refs/heads/#{branch}"], credentials: credentials_for(remote))
18
+ rescue StandardError
19
+ Dir.chdir(File.dirname(repo.path)) do
20
+ system("git push #{remote} #{branch}", exception: true)
21
+ end
19
22
  end
20
23
 
21
24
  def patch
@@ -42,6 +45,7 @@ module Dependabot
42
45
  end
43
46
 
44
47
  def credentials_for(remote)
48
+ Dependabot.logger.debug(repo.remotes[remote].url)
45
49
  if ssh?(repo.remotes[remote].url)
46
50
  Rugged::Credentials::SshKeyFromAgent.new(username: "git")
47
51
  else
@@ -55,7 +55,7 @@ module Dependabot
55
55
  GitHub.name_with_owner_from(git.repo.remotes["origin"].url),
56
56
  default_branch,
57
57
  branch_name,
58
- "chore(deps): bump #{dependency}",
58
+ "chore(deps): bump #{dependency.name} from #{dependency.version}",
59
59
  description_for(dependency)
60
60
  )
61
61
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependanot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan