-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Azure DevOps (Microsoft Entra ID OAuth) migrate components #19483
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
WalkthroughThis PR extends the Azure DevOps Microsoft Entra ID OAuth component with event subscription capabilities. It adds API helper methods for managing subscriptions, a new event source that creates and manages webhook subscriptions, and updates the package version and dependencies accordingly. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Pipedream as Pipedream Workflow
participant DB as Database
participant ADOAPI as Azure DevOps API
participant WebhookSvc as Webhook Service
User->>Pipedream: Activate source with eventType
Pipedream->>ADOAPI: POST /hooks/subscriptions (webhook payload)
ADOAPI-->>Pipedream: Return subscriptionId
Pipedream->>DB: Store subscriptionId
alt Event Received
WebhookSvc->>Pipedream: HTTP POST webhook event
Pipedream->>Pipedream: generateMeta(event body)
Pipedream->>User: Emit event with metadata
end
User->>Pipedream: Deactivate source
Pipedream->>DB: Retrieve subscriptionId
Pipedream->>ADOAPI: DELETE /hooks/subscriptions/{subscriptionId}
ADOAPI-->>Pipedream: Success
Pipedream->>DB: Clear subscriptionId
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
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: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs(1 hunks)components/azure_devops_microsoft_entra_id_oauth/package.json(2 hunks)components/azure_devops_microsoft_entra_id_oauth/sources/new-event/new-event.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 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/azure_devops_microsoft_entra_id_oauth/package.json
📚 Learning: 2024-10-10T19:18:27.998Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Applied to files:
components/azure_devops_microsoft_entra_id_oauth/sources/new-event/new-event.mjs
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.
Applied to files:
components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.
Applied to files:
components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs
⏰ 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: Lint Code Base
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
🔇 Additional comments (8)
components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs (5)
18-20: LGTM!The base URL construction correctly uses the organization from the auth configuration.
44-50: LGTM!The subscription creation method correctly delegates to the POST endpoint.
51-57: LGTM!The subscription deletion method correctly constructs the DELETE request.
21-36: No action needed. API version 7.1 is correct for Microsoft Entra ID OAuth with Azure DevOps REST API and is officially supported in 2024-2025. The implementation follows Microsoft's recommended approach for Entra ID OAuth integration.
37-43: No action needed on this endpoint.The
/hooks/publishers/tfs/eventtypesendpoint is the current, documented Azure DevOps REST API endpoint for retrieving webhook event types. The "tfs" publisher identifier is the standard publisher name for Azure DevOps (not a legacy identifier), and it works seamlessly with Microsoft Entra ID OAuth authentication. The endpoint compatibility is not affected by the authentication method used.components/azure_devops_microsoft_entra_id_oauth/sources/new-event/new-event.mjs (3)
1-20: LGTM!The component structure and prop definitions follow Pipedream conventions correctly.
44-50: LGTM!The hookId persistence methods correctly use the db service.
59-63: LGTM!The run method correctly emits webhook events with generated metadata, following standard Pipedream patterns.
components/azure_devops_microsoft_entra_id_oauth/azure_devops_microsoft_entra_id_oauth.app.mjs
Show resolved
Hide resolved
components/azure_devops_microsoft_entra_id_oauth/sources/new-event/new-event.mjs
Show resolved
Hide resolved
components/azure_devops_microsoft_entra_id_oauth/sources/new-event/new-event.mjs
Show resolved
Hide resolved
components/azure_devops_microsoft_entra_id_oauth/sources/new-event/new-event.mjs
Show resolved
Hide resolved
luancazarine
left a comment
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.
Hi @michelle0927, LGTM! Ready for QA!
For Integration QA: |
Resolves #18106
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.