eduardoarantes opened a new pull request, #8900:
URL: https://github.com/apache/devlake/pull/8900

   ### Summary
   
   Adds a new **Linear** (linear.app) data source plugin, plus its config-ui 
registration and a Grafana dashboard.
   
   The plugin follows DevLake's 3-stage ETL using framework helpers:
   - **Collect** (GraphQL → `_raw_linear_*`) via `NewStatefulApiCollector` + 
`CreateAsyncGraphqlClient` with rate-limit pacing; incremental collection uses 
a server-side `updatedAt` filter.
   - **Extract** (`_raw_linear_*` → `_tool_linear_*`).
   - **Convert** (`_tool_linear_*` → domain tables).
   
   Scope = Linear **Team** → `ticket.Board`. Auth = personal API key 
(`Authorization: <key>`). Status is mapped deterministically from 
`WorkflowState.type` (no user-supplied mapping): `triage,backlog,unstarted → 
TODO`, `started → IN_PROGRESS`, `completed,canceled → DONE`.
   
   Domain mappings:
   - Team → `boards`
   - Issues → `issues` + `board_issues` + `issue_assignees` (with 
assignee/creator names)
   - Comments → `issue_comments`
   - Labels → `issue_labels`
   - Cycles → `sprints` + `sprint_issues`
   - Issue history → `issue_changelogs`, and lead/cycle time derived from 
in-progress→done transitions
   - Users → `accounts`
   
   Also includes:
   - **config-ui**: Linear connection form (endpoint + personal API key), Teams 
data scope backed by remote-scopes, and the scope-id mapping.
   - **Grafana**: `grafana/dashboards/Linear.json` (per-tool dashboard, like 
Jira/Asana).
   
   ### Does this close any open issues?
   N/A — new plugin contribution.
   
   ### Tests
   - e2e `DataFlowTester` tests for every extractor and convertor under 
`backend/plugins/linear/e2e`, plus unit tests for status mapping, the 
incremental filter, scope/remote-scope mapping, and board/lead-time/long-title 
edge cases.
   - `make build` and `golangci-lint run` are clean; the full 
`plugins/linear/...` suite passes against MySQL.
   
   ### Other Information
   - All commits are DCO signed-off and use conventional commit messages.
   - Edge cases covered: every `WorkflowState.type` (incl. 
triage/unknown→OTHER), unassigned issue, issue with no cycle, multiple labels, 
lead/cycle-time from history, resolution-before-creation guard, and long issue 
titles/URLs.
   - A Linear dashboard screenshot can be added to this PR description in the 
GitHub UI.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to