Class: Onebox::Engine::GithubActionsOnebox

Inherits:
Object
  • Object
show all
Includes:
Onebox::Engine, JSON, LayoutSupport, Mixins::GithubAuthHeader
Defined in:
lib/onebox/engine/github_actions_onebox.rb

Instance Attribute Summary

Attributes included from Onebox::Engine

#errors, #options, #timeout, #uri

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mixins::GithubAuthHeader

#github_auth_header

Methods included from LayoutSupport

#layout, max_text, #to_html

Methods included from Onebox::Engine

all_iframe_origins, engines, included, #initialize, origins_to_regexes, #placeholder_html, #to_html

Class Method Details

.priorityObject



27
28
29
# File 'lib/onebox/engine/github_actions_onebox.rb', line 27

def self.priority
  90 # overlaps with GithubPullRequestOnebox
end

Instance Method Details

#urlObject



19
20
21
22
23
24
25
# File 'lib/onebox/engine/github_actions_onebox.rb', line 19

def url
  if type == :actions_run
    "https://api.github.com/repos/#{match[:org]}/#{match[:repo]}/actions/runs/#{match[:run_id]}"
  elsif type == :pr_run
    "https://api.github.com/repos/#{match[:org]}/#{match[:repo]}/check-runs/#{match[:check_run_id]}"
  end
end