hubmerge 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/hubmerge/options.rb +7 -1
- data/lib/hubmerge/version.rb +1 -1
- data/lib/hubmerge.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55737cf494265c5702e9643b8a61f5cdb263c3397e291c6e2a62b7928a075513
|
4
|
+
data.tar.gz: 1db2d7c3003a7fab2c590e5a6d1e664e0d588e144e99c9457ce5968f026e9dbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 421109e14a81bd8e10e531827c27cda86379308cc20e96ec9c99dd38eaf92e0d149b9dc8d764c713bfc21963a2bde0d4a193a3064ff59c32428f2a3d8d685b95
|
7
|
+
data.tar.gz: 6a82cbf9d4443a9baa5f4303f7a15ffb7134ec61de784debefc03bc29c82cc5686729001f7b6bfe9b74243632647fdcf5371b0f7f325aa69e816794047374dd9
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
hubmerge (0.0.
|
4
|
+
hubmerge (0.0.4)
|
5
5
|
octokit (~> 4.0)
|
6
6
|
tty-prompt (~> 0.18)
|
7
7
|
tty-spinner (~> 0.9)
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
minitest (5.11.3)
|
18
18
|
multipart-post (2.0.0)
|
19
19
|
necromancer (0.4.0)
|
20
|
-
octokit (4.
|
20
|
+
octokit (4.14.0)
|
21
21
|
sawyer (~> 0.8.0, >= 0.5.3)
|
22
22
|
pastel (0.7.2)
|
23
23
|
equatable (~> 0.5.0)
|
data/lib/hubmerge/options.rb
CHANGED
@@ -22,7 +22,13 @@ module HubMerge
|
|
22
22
|
short_switch: "-y",
|
23
23
|
long_switch: "--yes",
|
24
24
|
type: :flag,
|
25
|
-
description: "Merge without confirmation from user (default: false)"
|
25
|
+
description: "Merge without confirmation from user (default: false)"
|
26
|
+
},
|
27
|
+
approve_before_merge: {
|
28
|
+
short_switch: "-a",
|
29
|
+
long_switch: "--approve",
|
30
|
+
type: :flag,
|
31
|
+
description: "Approve PR before merge (default: false)"
|
26
32
|
},
|
27
33
|
}
|
28
34
|
end
|
data/lib/hubmerge/version.rb
CHANGED
data/lib/hubmerge.rb
CHANGED
@@ -40,14 +40,14 @@ module HubMerge
|
|
40
40
|
@prompts.say("No pull requests selected, aborting")
|
41
41
|
return 1
|
42
42
|
else
|
43
|
-
merge_pull_requests(prs_to_merge)
|
43
|
+
merge_pull_requests(prs_to_merge, opts)
|
44
44
|
return 0
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
private
|
49
49
|
|
50
|
-
def merge_pull_requests(prs_to_merge)
|
50
|
+
def merge_pull_requests(prs_to_merge, opts)
|
51
51
|
total = prs_to_merge.count
|
52
52
|
prs_to_merge.each_with_index do |pr, index|
|
53
53
|
mergeable = false
|
@@ -64,8 +64,10 @@ module HubMerge
|
|
64
64
|
|
65
65
|
next unless mergeable
|
66
66
|
|
67
|
-
|
68
|
-
@
|
67
|
+
if opts[:approve_before_merge]
|
68
|
+
@spinner.with_child("[:spinner] Approving") do
|
69
|
+
@merger.approve_if_not_approved(github_client, pr)
|
70
|
+
end
|
69
71
|
end
|
70
72
|
|
71
73
|
@spinner.with_child("[:spinner] Merging") do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubmerge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Kuruvilla
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|