feat: add liner integration

This commit is contained in:
Muhsin Keloth
2024-05-02 13:39:57 +05:30
parent af39308851
commit ead7cc0c36
10 changed files with 135 additions and 3 deletions
@@ -0,0 +1,23 @@
class Integrations::Linear::ProcessorService
pattr_initialize [:account!, :conversation!]
def create_issue; end
def link_issue; end
def list_issues
issues = linear_client.list_issues
issues.map(&:as_json)
end
private
def linear_hook
@linear_hook ||= account.hooks.find_by!(app_id: 'linear')
end
def linear_client
credentials = linear_hook.settings
@linear_client ||= Linear.new(credentials['api_key'])
end
end