fix(doc): add task read scope to docs fetch#440
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR adds Confidence Score: 5/5Safe to merge — the one-line scope addition is correct and bot auth is unaffected. All findings are P2 (style suggestion only). The core change is correct: No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CLI as lark-cli docs +fetch
participant Runner as runner.go (checkShortcutScopes)
participant MCP as MCP Server (fetch-doc)
participant LarkAPI as Lark API
User->>CLI: docs +fetch --doc url
CLI->>Runner: ScopesForIdentity("user") → ["docx:document:readonly", "task:task:read"]
Runner->>Runner: checkScopePrereqs(appID, userOpenID, scopes)
alt Missing task:task:read
Runner-->>User: Error: missing_scope → prompt re-auth
else All scopes present
CLI->>MCP: tools/call fetch-doc {doc_id}
MCP->>LarkAPI: fetch document content
LarkAPI-->>MCP: document blocks (may include task refs)
MCP->>LarkAPI: fetch task data (requires task:task:read)
LarkAPI-->>MCP: task data
MCP-->>CLI: {title, markdown, has_more}
CLI-->>User: formatted document output
end
Reviews (1): Last reviewed commit: "fix(doc): add task read scope to docs fe..." | Re-trigger Greptile |
Summary
docs +fetchmay need to read task-related data referenced in Lark documents. This PR adds thetask:task:readscope todocs +fetchto avoid missing-scope failures when fetching docs that include tasks.Changes
task:task:readtoDocsFetch.Scopesinshortcuts/doc/docs_fetch.goTest Plan
go test ./shortcuts/doc/...Related Issues
N/A
Summary by CodeRabbit