Class: WifiWand::Scripts::LatestCiStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/wifi_wand/scripts/latest_ci_status.rb

Instance Method Summary collapse

Instance Method Details

#callObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/wifi_wand/scripts/latest_ci_status.rb', line 11

def call
  branch = fetch_current_branch
  repository = fetch_repository
  puts "Fetching latest CI run for branch: #{branch}..."
  puts "Repository: #{repository}"

  run_data = fetch_latest_run(branch, repository)

  if run_data.nil?
    puts "No workflow runs found for branch '#{branch}'."
    return
  end

  display_run_details(run_data, repository)
end