danger-additional-logging 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/danger/scm_source/git_repo.rb +12 -8
- data/lib/danger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c396f0ffb2b47bd551cdefc999316ef06df744364dbbbebc595da5bbe3807bf5
|
4
|
+
data.tar.gz: c0e70fc51943f6a5d7f984a8b3c1be5d0ed79353bf179df927d50cd230f2f5ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 185d4c5208aa5c86c30f3fc38edd2d7ed503ccf27188404b260177e966233d2591f850ea9132202d9e061521df75e5d894bce7d780ca40f082bbd043d9d2697a
|
7
|
+
data.tar.gz: c19d20b4a5b24c1989ddfdbce69873bb9bc352ea030f34da02c2dd6a594061d13184ad6f5b6a99d8c3b6eb20ba03130c1cf71072457112cfaf7258d976a54ecb
|
@@ -98,10 +98,7 @@ module Danger
|
|
98
98
|
puts "The commit #{commitish} DOES NOT exist in #{branch}"
|
99
99
|
end
|
100
100
|
|
101
|
-
puts "
|
102
|
-
exec("rev-parse --is-shallow-repository", true)
|
103
|
-
|
104
|
-
puts "Last 5 commits for #{branch}"
|
101
|
+
puts "Last 3 commits for current branch"
|
105
102
|
exec("branch -v", true)
|
106
103
|
exec("--no-pager log -n 5", true)
|
107
104
|
|
@@ -130,7 +127,7 @@ module Danger
|
|
130
127
|
end
|
131
128
|
|
132
129
|
def git_fetch_branch_to_depth(branch, depth)
|
133
|
-
exec("fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}")
|
130
|
+
exec("fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}", true)
|
134
131
|
end
|
135
132
|
|
136
133
|
def default_env
|
@@ -150,7 +147,7 @@ module Danger
|
|
150
147
|
end
|
151
148
|
|
152
149
|
def find_merge_base(repo, from, to)
|
153
|
-
puts "find_merge_base(
|
150
|
+
puts "find_merge_base(from=#{from}, to=#{to})"
|
154
151
|
|
155
152
|
possible_merge_base = possible_merge_base(repo, from, to)
|
156
153
|
return possible_merge_base if possible_merge_base
|
@@ -167,7 +164,7 @@ module Danger
|
|
167
164
|
end
|
168
165
|
|
169
166
|
def find_merge_base_with_incremental_fetch(repo, from, to)
|
170
|
-
puts "find_merge_base_with_incremental_fetch"
|
167
|
+
puts "find_merge_base_with_incremental_fetch(from=#{from}, to=#{to})"
|
171
168
|
|
172
169
|
from_is_ref = commit_is_ref?(from)
|
173
170
|
to_is_ref = commit_is_ref?(to)
|
@@ -185,6 +182,7 @@ module Danger
|
|
185
182
|
end
|
186
183
|
|
187
184
|
def possible_merge_base(repo, from, to)
|
185
|
+
puts "possible_merge_base(from=#{from}, to=#{to})"
|
188
186
|
[repo.merge_base(from, to)].find { |base| commit_exists?(base) }
|
189
187
|
end
|
190
188
|
|
@@ -223,7 +221,13 @@ module Git
|
|
223
221
|
# Use git-merge-base https://git-scm.com/docs/git-merge-base to
|
224
222
|
# find as good common ancestors as possible for a merge
|
225
223
|
def merge_base(commit1, commit2, *other_commits)
|
226
|
-
|
224
|
+
puts "will git merge-base commit1 #{commit1}, commit2 #{commit2}"
|
225
|
+
output = Open3.popen2("git", "merge-base", commit1, commit2, *other_commits) { |_stdin, stdout, _wait_thr| stdout.read.rstrip }
|
226
|
+
|
227
|
+
puts "Command output:"
|
228
|
+
puts output
|
229
|
+
|
230
|
+
output
|
227
231
|
end
|
228
232
|
end
|
229
233
|
end
|
data/lib/danger/version.rb
CHANGED