Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Dec 15, 2025

WHY

Resolves #12538

Summary by CodeRabbit

Release Notes

  • New Features
    • Integrated D2L Brightspace platform with new actions for managing enrollments, retrieving user profiles and grade values, listing organizational units, and accessing dropbox folders.

✏️ Tip: You can customize this high-level summary in your review settings.

@jcortes jcortes self-assigned this Dec 15, 2025
@vercel
Copy link

vercel bot commented Dec 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 15, 2025 6:16pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Walkthrough

This pull request introduces a comprehensive D2L Brightspace API integration by adding five new action modules (create-enrollment, get-grade-values, get-user, list-dropbox-folders, list-enrollments, list-org-units), a constants module, and extending the app module with propDefinitions and HTTP utilities for API communication and pagination handling.

Changes

Cohort / File(s) Summary
New action modules
components/d2l_brightspace/actions/create-enrollment/create-enrollment.mjs, get-grade-values/get-grade-values.mjs, get-user/get-user.mjs, list-dropbox-folders/list-dropbox-folders.mjs, list-enrollments/list-enrollments.mjs, list-org-units/list-org-units.mjs
Six new action modules added, each exporting a default action object with metadata (key, name, description, version, type), props referencing app and resource identifiers, annotations (destructiveHint, openWorldHint, readOnlyHint, idempotentHint), and a run method that calls corresponding app methods, exports summaries, and returns results.
App module enhancements
components/d2l_brightspace/d2l_brightspace.app.mjs
Added propDefinitions for orgUnitId, userId, roleId, and gradeObjectId with async options. Introduced HTTP utilities (getUrl, _headers, _makeRequest) and API methods (listOrgUnits, listUsers, getUser, listRoles, createEnrollment, listEnrollmentsByOrgUnit, listGrades, getGradeValue, listDropboxFolders) plus a paginate helper for handling paginated API responses.
Constants module
components/d2l_brightspace/common/constants.mjs
New constants module defining internal values (DOMAIN_PLACEHOLDER, BASE_URL_TEMPLATE, DEFAULT_LIMIT, DEFAULT_MAX, LP_VERSION, LE_VERSION, API_CONTEXTS) exported as default object.
Package metadata
components/d2l_brightspace/package.json
Version bumped from 0.0.1 to 0.1.0 and "@pipedream/platform": "^3.1.1" added to dependencies.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • App module (d2l_brightspace.app.mjs): Requires careful review of the 12+ new methods, propDefinition implementations, HTTP utilities, pagination logic, API path construction, and request/authorization handling to ensure correctness and consistency.
  • Action-to-app integration: Verify that each action's run method correctly maps props to app method parameters and handles responses appropriately.
  • PropDefinitions: Confirm async options properly fetch and format selectable values from the Brightspace APIs with correct pagination context handling.
  • Constants usage: Ensure all new methods correctly reference and use constants for URLs, versions, and API contexts.

Suggested reviewers

  • luancazarine
  • lcaresia

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description only contains 'Resolves #12538' without explaining the WHY section as required by the template. Complete the WHY section in the description to explain the rationale and business value of adding these new D2L Brightspace components.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: introducing new D2L Brightspace components.
Linked Issues check ✅ Passed The PR implements new D2L Brightspace components with proper API integration, actions, and app configuration as required by #12538.
Out of Scope Changes check ✅ Passed All changes are scoped to D2L Brightspace component implementation, with no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch d2l-brightspace-new-components

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01b5dcf and de1875e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • components/d2l_brightspace/actions/create-enrollment/create-enrollment.mjs (1 hunks)
  • components/d2l_brightspace/actions/get-grade-values/get-grade-values.mjs (1 hunks)
  • components/d2l_brightspace/actions/get-user/get-user.mjs (1 hunks)
  • components/d2l_brightspace/actions/list-dropbox-folders/list-dropbox-folders.mjs (1 hunks)
  • components/d2l_brightspace/actions/list-enrollments/list-enrollments.mjs (1 hunks)
  • components/d2l_brightspace/actions/list-org-units/list-org-units.mjs (1 hunks)
  • components/d2l_brightspace/common/constants.mjs (1 hunks)
  • components/d2l_brightspace/d2l_brightspace.app.mjs (1 hunks)
  • components/d2l_brightspace/package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 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/d2l_brightspace/package.json
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Applied to files:

  • components/d2l_brightspace/d2l_brightspace.app.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/d2l_brightspace/d2l_brightspace.app.mjs
🧬 Code graph analysis (5)
components/d2l_brightspace/actions/get-grade-values/get-grade-values.mjs (4)
components/d2l_brightspace/actions/create-enrollment/create-enrollment.mjs (1)
  • response (37-44)
components/d2l_brightspace/actions/get-user/get-user.mjs (1)
  • response (25-28)
components/d2l_brightspace/actions/list-dropbox-folders/list-dropbox-folders.mjs (1)
  • response (25-28)
components/d2l_brightspace/d2l_brightspace.app.mjs (5)
  • response (24-26)
  • response (51-53)
  • response (72-72)
  • response (88-90)
  • response (193-195)
components/d2l_brightspace/actions/create-enrollment/create-enrollment.mjs (4)
components/d2l_brightspace/actions/get-grade-values/get-grade-values.mjs (1)
  • response (40-45)
components/d2l_brightspace/actions/get-user/get-user.mjs (1)
  • response (25-28)
components/d2l_brightspace/actions/list-dropbox-folders/list-dropbox-folders.mjs (1)
  • response (25-28)
components/d2l_brightspace/d2l_brightspace.app.mjs (5)
  • response (24-26)
  • response (51-53)
  • response (72-72)
  • response (88-90)
  • response (193-195)
components/d2l_brightspace/actions/get-user/get-user.mjs (4)
components/d2l_brightspace/actions/create-enrollment/create-enrollment.mjs (1)
  • response (37-44)
components/d2l_brightspace/actions/get-grade-values/get-grade-values.mjs (1)
  • response (40-45)
components/d2l_brightspace/actions/list-dropbox-folders/list-dropbox-folders.mjs (1)
  • response (25-28)
components/d2l_brightspace/d2l_brightspace.app.mjs (5)
  • response (24-26)
  • response (51-53)
  • response (72-72)
  • response (88-90)
  • response (193-195)
components/d2l_brightspace/actions/list-org-units/list-org-units.mjs (3)
components/d2l_brightspace/d2l_brightspace.app.mjs (1)
  • orgUnits (27-27)
components/d2l_brightspace/actions/list-enrollments/list-enrollments.mjs (1)
  • iterator (47-54)
components/zep/actions/get-threads/get-threads.mjs (1)
  • max (39-39)
components/d2l_brightspace/d2l_brightspace.app.mjs (6)
components/d2l_brightspace/actions/list-enrollments/list-enrollments.mjs (1)
  • params (42-42)
components/d2l_brightspace/actions/create-enrollment/create-enrollment.mjs (1)
  • response (37-44)
components/d2l_brightspace/actions/get-grade-values/get-grade-values.mjs (1)
  • response (40-45)
components/d2l_brightspace/actions/get-user/get-user.mjs (1)
  • response (25-28)
components/d2l_brightspace/actions/list-dropbox-folders/list-dropbox-folders.mjs (1)
  • response (25-28)
components/d2l_brightspace/actions/list-org-units/list-org-units.mjs (1)
  • orgUnits (51-51)
⏰ 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: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (7)
components/d2l_brightspace/package.json (1)

3-16: LGTM!

Version bump to 0.1.0 is appropriate for the new component additions, and the @pipedream/platform dependency is correctly added to support the axios usage in the app module.

components/d2l_brightspace/actions/get-grade-values/get-grade-values.mjs (1)

39-49: LGTM!

The run method correctly calls the app's getGradeValue with the required parameters and follows the established pattern for summary export.

components/d2l_brightspace/actions/list-org-units/list-org-units.mjs (1)

42-71: LGTM!

The run method correctly implements pagination using the app's paginate generator, with proper result collection and summary pluralization handling.

components/d2l_brightspace/d2l_brightspace.app.mjs (3)

7-98: LGTM!

The propDefinitions are well-implemented with proper pagination support for orgUnitId and userId, appropriate fallback handling for response formats (response.Items || response || []), and sensible dependency injection for gradeObjectId based on orgUnitId.


100-120: LGTM!

The HTTP utility methods follow Pipedream conventions. The URL construction with domain placeholder replacement is clean, and _makeRequest properly integrates with the platform's axios wrapper.


121-185: LGTM!

API methods are well-structured with consistent patterns. The separation between LP (user/enrollment management) and LE (course-specific resources) API contexts aligns with D2L Brightspace API organization.

components/d2l_brightspace/actions/get-user/get-user.mjs (1)

3-32: Get User action is clear and consistent

Props wiring, annotations, and the run implementation (delegating to this.app.getUser and exporting a concise summary) look correct and consistent with the other actions in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Components] d2l_brightspace

2 participants