feat: Add user attribution to Linear integration with actor authorization (#11774)

- Add `actor=app` parameter to Linear OAuth authorization URL for
consistent app-level authorization
https://linear.app/developers/oauth-actor-authorization
- Implement user attribution for Linear issue creation and linking using
`createAsUser` and `displayIconUrl` parameters
- Enhance Linear integration to properly attribute actions to specific
Chatwoot agents

**Note**
- The displayIconUrl parameter is being sent correctly to Linear's
GraphQL API (verified through testing), but there is an issues with icon
is not attaching properly.
- We might need to disconnect the integration connect again.
This commit is contained in:
Muhsin Keloth
2025-07-01 16:49:26 +05:30
committed by GitHub
parent 14ba73fc63
commit 01acbe3cda
8 changed files with 168 additions and 35 deletions

View File

@@ -22,8 +22,8 @@ class Integrations::Linear::ProcessorService
}
end
def create_issue(params)
response = linear_client.create_issue(params)
def create_issue(params, user = nil)
response = linear_client.create_issue(params, user)
return response if response[:error]
{
@@ -33,8 +33,8 @@ class Integrations::Linear::ProcessorService
}
end
def link_issue(link, issue_id, title)
response = linear_client.link_issue(link, issue_id, title)
def link_issue(link, issue_id, title, user = nil)
response = linear_client.link_issue(link, issue_id, title, user)
return response if response[:error]
{