MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-1721

Plan in TAPD (Tencent 腾讯)

Blocked
Description

Motir-AI creates and updates 需求 (stories) and 缺陷 (bugs) directly in a connected TAPD workspace from a Motir plan, mirrored as motir-core work items and kept in sync.

Why TAPD is the first China vendor. TAPD (腾讯敏捷产品研发平台, tapd.cn) is Tencent's own agile R&D platform, used internally and sold externally — the widest-installed of the four Chinese-giant tools, and the only one whose auth model fits Motir's shipped connect substrate without amending an ADR.

Adapter + connection — the engine comes from Plan in Jira (blocked_by it). Unlike Jira / Linear / Plane, TAPD is not a connected source today, so this story brings the vendor connection as well as the write adapter:

  • OAuth connect (verified). TAPD implements a standard OAuth 2.0 authorization-code flow: authorize at https://www.tapd.cn/oauth/?response_type=code&client_id=…&redirect_uri=…&scope=…&state=…, then exchange the code at POST https://api.tapd.cn/tokens/request_token with the client id/secret Basic-encoded. Scopes are space-separated (e.g. story bug) and the issued token is workspace-scoped — the user picks the workspace during authorization, which maps cleanly onto per-connection storage in 7.16.10 — ImportSourceIdentity. No amendment to 7.16.14 — OAuth is the SOLE live-source auth is needed.
  • ⚠️ Token lifetime is the risk to design for. The access token is valid 7200s (2 hours) and the authorization code only 5 minutes; TAPD's user-mode documentation does not describe a refresh token. Pin the refresh/re-authorization story against the live API before building the token layer — a 2-hour token with no refresh means a re-connect prompt on every session unless one exists. This is the story's first open question, not an assumption to build past.
  • Write adapter. POST https://api.tapd.cn/stories creates a 需求; the bug endpoints cover 缺陷. Map Motir kind / type / status / priority / assignee / iteration / parent onto TAPD's 需求 category tree + 缺陷 model and its per-workspace custom workflow statuses (TAPD workflows are configured per workspace, so status mapping must be read from the workspace, never hardcoded).
  • Sync back — TAPD's webhook/callback configuration for vendor-side edits, feeding the engine's conflict rule.
  • Registration is an out-of-band human step: create the TAPD open-platform application to obtain the client_id / client_secret and register the redirect URI — the same shape as the shipped 7.16.7a — register the Linear OAuth app, and it becomes a manual subtask at expansion.

Boundary. WRITE direction only. This story stands up the TAPD connection + write path; extending the importer to read a TAPD backlog is explicitly NOT in scope — that is a hand-off to Issue importer in Epic 7, which owns the read connectors. Build the TAPD API client against the shipped connector interface (7.16.4a) so the importer can reuse it when that hand-off is taken.

Not yet expanded into subtasks — expand when picked up.

Status
Blocked
Type
Story