tutter-sppuppet 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/tutter/action/sppuppet.rb +5 -5
- data/tutter-sppuppet.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmUzMTk2ZTgzMDkxZTJjN2I4ZDU2YWI5NTAzYTQ4MjgyNWNkODAyZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTBkMWZhNWNjN2VhM2E3NzI4MzNiZjhkZDUyYzViZDhhNzY5ZGNiMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2RiNjNiZTg2NGRhMzMzMTBlMWE3OWQ0N2U2NDVjMTE3ODA5OGNhYWY5NjJk
|
10
|
+
MTZiMjUyODc2NzBmNGU3ZDQzMTU1MThkNGU1OWEwYjU3MThhODI4YjQyNmZm
|
11
|
+
OGMzYWY5NzRkN2ZkZWE1OTQ4Y2E3NjU4NzQ4OTUzMzNmOWI1YmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTdkYjQ3OWNkMThlMTAxZmE2MThkYzAwOGEzNzBlZDRiNzE1Y2M3MDI2MDIy
|
14
|
+
MTA2NzUwYTQzNjU3NDU2NjVmNGMxMWRkZmVjYmEzM2ZhNmZiY2M2ZWZkNGU3
|
15
|
+
ZGU3NDQ0MDI5ZTc0MDkwNGM4ZTYwZGI0M2NhYjkwODUyNjg1ZDY=
|
@@ -28,7 +28,7 @@ class Sppuppet
|
|
28
28
|
|
29
29
|
pull_request_id = @data['issue']['number']
|
30
30
|
|
31
|
-
merge_command = MERGE_COMMENT.match
|
31
|
+
merge_command = MERGE_COMMENT.match(@data['comment']['body'])
|
32
32
|
|
33
33
|
return 200, 'Not a merge comment' unless merge_command
|
34
34
|
|
@@ -73,7 +73,7 @@ class Sppuppet
|
|
73
73
|
# We only want to check newer comments
|
74
74
|
next if last_commit_date > i.created_at
|
75
75
|
|
76
|
-
if MERGE_COMMENT.match
|
76
|
+
if MERGE_COMMENT.match(i.body)
|
77
77
|
merger ||= i.attrs[:user].attrs[:login]
|
78
78
|
# Count as a +1 if it is not the author
|
79
79
|
unless pr.user.login == i.attrs[:user].attrs[:login]
|
@@ -81,15 +81,15 @@ class Sppuppet
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
if PLUS_VOTE.match
|
84
|
+
if PLUS_VOTE.match(i.body) && pr.user.login != i.attrs[:user].attrs[:login]
|
85
85
|
votes[i.attrs[:user].attrs[:login]] = 1
|
86
86
|
end
|
87
87
|
|
88
|
-
if MINUS_VOTE.match
|
88
|
+
if MINUS_VOTE.match(i.body) && pr.user.login != i.attrs[:user].attrs[:login]
|
89
89
|
votes[i.attrs[:user].attrs[:login]] = -1
|
90
90
|
end
|
91
91
|
|
92
|
-
if BLOCK_VOTE.match
|
92
|
+
if BLOCK_VOTE.match(i.body)
|
93
93
|
msg = 'Commit cannot be merged so long as a -2 comment appears in the PR.'
|
94
94
|
return post_comment(pull_request_id, msg)
|
95
95
|
end
|
data/tutter-sppuppet.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'tutter-sppuppet'
|
4
|
-
s.version = '1.2.
|
4
|
+
s.version = '1.2.1'
|
5
5
|
s.author = ['Johan Haals', 'Erik Dalén', 'Alexey Lapitsky']
|
6
6
|
s.email = ['johan.haals@gmail.com', 'dalen@spotify.com', 'alexey@spotify.com']
|
7
7
|
s.homepage = 'https://github.com/jhaals/tutter-sppuppet'
|