githook 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/lib/githook/bot.rb +8 -1
- data/lib/githook/event_objects/pull_request.rb +4 -2
- data/lib/githook/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a09a5d7db730de64c40fa7a7a0f9cbecdd8d0ab
|
4
|
+
data.tar.gz: ee89824abdeb856bc6976e9e0c479ae120d1740b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c5ddf57bb232a3e987b3fb33e60bfc86aa1e8b1a95ee967d0c665d18bc2875042731c83fa681803df5b5caa19d862860bba539b4842dc03cdc01bf2bcde4dcf
|
7
|
+
data.tar.gz: 0a45efd6eb153e3716dfbb04be8f7885f5b20120c639b731b69362e8faaa545a75a7f20c66b2eb02c3b61ece425425cef1471c726ab6880946a284a51160af5b
|
data/lib/githook/bot.rb
CHANGED
@@ -63,7 +63,14 @@ module Githook
|
|
63
63
|
if handler
|
64
64
|
pr_info = body['pull_request'] || body['issue']
|
65
65
|
repo_name = pr_info['head'] ? pr_info['head']['repo']['full_name'] : nil
|
66
|
-
|
66
|
+
assignee = pr_info['assignee'] ? pr_info['assignee']['login'] : nil
|
67
|
+
|
68
|
+
pr = Githook::PullRequest.new(
|
69
|
+
pr_info['title'], pr_info['body'], repo_name, pr_info['number'],
|
70
|
+
pr_info['user']['login'], assignee, pr_info['state'],
|
71
|
+
self.github_client
|
72
|
+
)
|
73
|
+
|
67
74
|
handler.call(pr)
|
68
75
|
end
|
69
76
|
end
|
@@ -1,13 +1,15 @@
|
|
1
1
|
module Githook
|
2
2
|
class PullRequest
|
3
|
-
attr_accessor :title, :description, :repo, :author
|
3
|
+
attr_accessor :title, :description, :repo, :author, :assignee, :state, :number
|
4
4
|
|
5
|
-
def initialize(title, description, full_repo_name, number, author, client)
|
5
|
+
def initialize(title, description, full_repo_name, number, author, assignee, state, client)
|
6
6
|
@title = title
|
7
7
|
@description = description
|
8
8
|
@number = number
|
9
9
|
@repo = full_repo_name
|
10
10
|
@author = author
|
11
|
+
@assignee = assignee
|
12
|
+
@state = state
|
11
13
|
@client = client
|
12
14
|
end
|
13
15
|
|
data/lib/githook/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: githook
|
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
|
- Michael West
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description:
|
42
|
-
email:
|
42
|
+
email: mpwest929@gmail.com
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
@@ -57,7 +57,7 @@ files:
|
|
57
57
|
- spec/webhooks/create_comment.json
|
58
58
|
- spec/webhooks/opened_pr.json
|
59
59
|
- spec/webhooks/reopened_pr.json
|
60
|
-
homepage:
|
60
|
+
homepage: https://github.com/miwest929/githook
|
61
61
|
licenses: []
|
62
62
|
metadata: {}
|
63
63
|
post_install_message:
|