Sha256: d2836a4262ecbaa31cc9f2574934af0f704065ae7b39cb0c336a3cfdf6895482

Contents?: true

Size: 331 Bytes

Versions: 29

Compression:

Stored size: 331 Bytes

Contents

require "json"

class CompareLinker
  class WebhookPayload
    def initialize(payload)
      @payload = payload
      @json = JSON.parse(@payload)
    end

    def action
      @json["action"]
    end

    def repo_full_name
      @json["repository"]["full_name"]
    end

    def pr_number
      @json["number"]
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
compare_linker-1.4.8 lib/compare_linker/webhook_payload.rb
compare_linker-1.4.7 lib/compare_linker/webhook_payload.rb
compare_linker-1.4.6 lib/compare_linker/webhook_payload.rb
compare_linker-1.4.5 lib/compare_linker/webhook_payload.rb
compare_linker-1.4.4 lib/compare_linker/webhook_payload.rb
compare_linker-1.4.3 lib/compare_linker/webhook_payload.rb
compare_linker-1.4.2 lib/compare_linker/webhook_payload.rb
compare_linker-1.4.1 lib/compare_linker/webhook_payload.rb
compare_linker-1.4.0 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.8 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.7 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.6 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.5 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.4 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.3 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.2 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.1 lib/compare_linker/webhook_payload.rb
compare_linker-1.3.0 lib/compare_linker/webhook_payload.rb
compare_linker-1.2.1 lib/compare_linker/webhook_payload.rb
compare_linker-1.2.0 lib/compare_linker/webhook_payload.rb