-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Microsoft 365 Planner - new-task-assigned-to-user #18272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a new Microsoft 365 Planner event source that emits events for tasks assigned to the authenticated user. Updates the package version to 0.3.0 and bumps the @pipedream/platform dependency to ^3.1.0 in the Microsoft 365 Planner component. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant SR as Source Runner
participant MP as Microsoft 365 Planner API
participant EM as Event Emitter
Note over SR: Scheduled/Invoked run
SR->>SR: getResourceFn() / getArgs()
SR->>MP: listUserTasks(args)
loop Paginate tasks
MP-->>SR: Page of tasks (async iterator)
SR->>EM: emitEvent(task)\n(id, summary, ts)
end
Note over SR,EM: Dedupe: unique by task.id
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes(none) Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
components/microsoft_365_planner/sources/new-task-assigned-to-user/new-task-assigned-to-user.mjs (3)
12-18: Consider exposing args for paging and filtering (optional).If the API supports $top / $select or plan/bucket scoping, exposing them via props or getArgs can reduce API load and user noise.
27-38: Optional: avoid initial backfill flood; emit only “newly assigned since install”.Today, unique-by-id will emit all existing assigned tasks on first run. Add an opt-out prop (e.g., emitOnStart: false) and skip items older than the first run’s checkpoint based on the assigned timestamp.
Example (assuming this.db is available via common):
export default { ...common, key: "microsoft_365_planner-new-task-assigned-to-user", @@ methods: { ...common.methods, @@ }, async run() { + const now = Date.now(); + const firstRun = !this.db.get("initialized"); + if (firstRun) this.db.set("initialized", true); + const fn = this.getResourceFn(); const args = this.getArgs(); const items = this.microsoft365Planner.paginate({ fn, args, }); for await (const item of items) { - this.emitEvent(item); + const ts = this.getAssignedTs(item); + if (!firstRun || this.emitOnStart) this.emitEvent(item); + else if (ts >= now) this.emitEvent(item); // only assignments observed after install } },If you’d like, I can wire up the emitOnStart boolean prop and update the docs.
30-33: Minor: consider passing a page size (if supported) to paginate.Helps control runtime and rate limiting for orgs with many tasks.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
components/microsoft_365_planner/package.json(2 hunks)components/microsoft_365_planner/sources/new-task-assigned-to-user/new-task-assigned-to-user.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/microsoft_365_planner/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: Publish TypeScript components
🔇 Additional comments (3)
components/microsoft_365_planner/package.json (2)
3-3: Version bump looks good.Increment to 0.3.0 matches the addition of a new public source.
16-16: @pipedream/platform v3.1.0 compatibility verified. Code uses only v3 APIs (this.$emit,this.db.get/set, timer interfaces,DEFAULT_POLLING_SOURCE_TIMER_INTERVAL); no^1.xpins remain.components/microsoft_365_planner/sources/new-task-assigned-to-user/new-task-assigned-to-user.mjs (1)
7-7: Description and docs link LGTM.Accurately describes the trigger and links to the correct Graph endpoint doc.
Resolves #18081
Summary by CodeRabbit
New Features
Chores