Class: CompareLinker::WebhookPayload
- Inherits:
-
Object
- Object
- CompareLinker::WebhookPayload
- Defined in:
- lib/compare_linker/webhook_payload.rb
Instance Method Summary collapse
- #action ⇒ Object
-
#initialize(payload) ⇒ WebhookPayload
constructor
A new instance of WebhookPayload.
- #pr_number ⇒ Object
- #repo_full_name ⇒ Object
Constructor Details
#initialize(payload) ⇒ WebhookPayload
Returns a new instance of WebhookPayload.
5 6 7 8 |
# File 'lib/compare_linker/webhook_payload.rb', line 5 def initialize(payload) @payload = payload @json = JSON.parse(@payload) end |
Instance Method Details
#action ⇒ Object
10 11 12 |
# File 'lib/compare_linker/webhook_payload.rb', line 10 def action @json["action"] end |
#pr_number ⇒ Object
18 19 20 |
# File 'lib/compare_linker/webhook_payload.rb', line 18 def pr_number @json["number"] end |
#repo_full_name ⇒ Object
14 15 16 |
# File 'lib/compare_linker/webhook_payload.rb', line 14 def repo_full_name @json["repository"]["full_name"] end |