Class: Onebox::Engine::GithubActionsOnebox

Inherits:
Object
  • Object
show all
Includes:
Onebox::Engine, JSON, LayoutSupport
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 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



25
26
27
# File 'lib/onebox/engine/github_actions_onebox.rb', line 25

def self.priority
  90 # overlaps with GithubPullRequestOnebox
end

Instance Method Details

#urlObject



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

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