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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 343adffd4b44ce17f0a0986d0288d448e1d2aa42
4
- data.tar.gz: 656d009224e57a9f31a02266e4f0bc77a0d579ac
3
+ metadata.gz: 6a09a5d7db730de64c40fa7a7a0f9cbecdd8d0ab
4
+ data.tar.gz: ee89824abdeb856bc6976e9e0c479ae120d1740b
5
5
  SHA512:
6
- metadata.gz: 9f061b511a75ce10cded9b983ba46f62e787722cba89a45cffeb65a50b49912d72954f48382219591a79e8e547144e1bed99c42a42ae565619de14e65d9961b0
7
- data.tar.gz: aff4ca2ded4914aacf8ce9c719cb018ad0441746511bc76b2dbaa3a9da9072986504989b1ac95b03937e0728b294791481a4f17952c554b9b828773d85fc6fea
6
+ metadata.gz: 1c5ddf57bb232a3e987b3fb33e60bfc86aa1e8b1a95ee967d0c665d18bc2875042731c83fa681803df5b5caa19d862860bba539b4842dc03cdc01bf2bcde4dcf
7
+ data.tar.gz: 0a45efd6eb153e3716dfbb04be8f7885f5b20120c639b731b69362e8faaa545a75a7f20c66b2eb02c3b61ece425425cef1471c726ab6880946a284a51160af5b
@@ -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
- pr = Githook::PullRequest.new(pr_info['title'], pr_info['body'], repo_name, body['number'], pr_info['user']['login'], self.github_client)
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
 
@@ -1,3 +1,3 @@
1
1
  module Githook
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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-29 00:00:00.000000000 Z
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: