Initial commit
This commit is contained in:
45
skills/bugsnag/bugsnag_helper.rb
Executable file
45
skills/bugsnag/bugsnag_helper.rb
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require_relative 'bugsnag_api_client'
|
||||
|
||||
class BugsnagHelper
|
||||
def initialize
|
||||
@client = BugsnagApiClient.new
|
||||
end
|
||||
|
||||
def list_errors(limit: 20, status: nil, severity: nil)
|
||||
@client.list_errors(limit: limit, status: status, severity: severity)
|
||||
end
|
||||
|
||||
def get_error_details(error_id)
|
||||
@client.get_error_details(error_id)
|
||||
end
|
||||
|
||||
def resolve_error(error_id)
|
||||
@client.resolve_error(error_id)
|
||||
end
|
||||
|
||||
def get_error_events(error_id, limit: 10)
|
||||
@client.get_error_events(error_id, limit: limit)
|
||||
end
|
||||
|
||||
def analyze_errors
|
||||
@client.analyze_errors
|
||||
end
|
||||
|
||||
def list_organizations
|
||||
@client.list_organizations
|
||||
end
|
||||
|
||||
def list_projects
|
||||
@client.list_projects
|
||||
end
|
||||
|
||||
def add_comment(error_id, message)
|
||||
@client.add_comment(error_id, message)
|
||||
end
|
||||
|
||||
def list_comments(error_id)
|
||||
@client.list_comments(error_id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user