Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Dec 2, 2025

Resolves #13450

Summary by CodeRabbit

  • New Features
    • Added action to create new courses in Educateme
    • Added action to search and filter existing courses
    • Added action to retrieve activities for a specific course
    • Added event source to trigger workflows when new courses are created
    • Added event source to trigger workflows when new course activities occur
    • Improved Educateme connector with course listing, activity retrieval, creation, and a dynamic course selector
    • Educateme component bumped to v0.1.0

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

@vercel
Copy link

vercel bot commented Dec 2, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Dec 2, 2025 10:48pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 2, 2025 10:48pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

Walkthrough

Adds an Educateme integration: app methods for course listing/creation, three actions (create-course, find-courses, get-course-activities), a polling-source base plus two sources (new-course-created, new-course-activity), and bumps component package version to 0.1.0.

Changes

Cohort / File(s) Summary
App core & package
components/educateme/educateme.app.mjs, components/educateme/package.json
Added propDefinitions.courseId (dynamic options via listCourses()); added methods _baseUrl(), _makeRequest({$ , path, ...opts}), listCourses(opts), listCourseActivities({ courseId, ...opts }), and createCourse(opts); removed authKeys(); bumped package version to 0.1.0 and added dependencies with @pipedream/platform.
Actions
components/educateme/actions/create-course/create-course.mjs, components/educateme/actions/find-courses/find-courses.mjs, components/educateme/actions/get-course-activities/get-course-activities.mjs
Three new action modules exporting default action descriptors. Each declares educateme prop (plus action-specific props), implements run({ $ }) calling corresponding app methods (createCourse, listCourses, listCourseActivities), exports a summary on success, and returns API results.
Sources - common base
components/educateme/sources/common/base.mjs
New reusable polling-source base exporting props (educateme, timer), abstract methods getResources() and generateMeta() that throw ConfigurationError, and run() implementation that fetches resources, generates meta, and emits events.
Sources - implementations
components/educateme/sources/new-course-created/new-course-created.mjs, components/educateme/sources/new-course-activity/new-course-activity.mjs
Two new source modules extending the common base. new-course-created implements getResources() via listCourses() and generateMeta() (id, summary, timestamp); new-course-activity implements getResources() via listCourseActivities(courseId) and generateMeta() (id, summary from activity title, timestamp).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

  • educateme.app.mjs: verify URL composition in _baseUrl/_makeRequest, header/auth usage, request/response error handling, and propDefinitions.courseId dynamic options implementation.
  • Action modules: check props shape, correct forwarding of parameters to app methods, and summary export formatting.
  • sources/common/base.mjs and source implementations: ensure polling timer default, ConfigurationError behavior, getResources/generateMeta contracts, and correct event emission (this.$emit) with meta.
  • package.json: confirm version bump and dependency entry format.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description only contains 'Resolves #13450' without elaboration on the changes, missing details about which components were added and their functionality. Expand the description to explain which components (sources/actions) were created and their primary purposes, following the template's WHY section.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Educateme - new components' accurately reflects the changeset which adds multiple new Educateme components including sources and actions.
Linked Issues check ✅ Passed All required components from issue #13450 have been implemented: polling sources (new-course-created, new-course-activity) and actions (create-course, get-course-activities, find-courses).
Out of Scope Changes check ✅ Passed All changes align with #13450 requirements: new polling sources, new actions, and supporting infrastructure (educateme.app.mjs, base.mjs, package.json).
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 issue-13450

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 27d3b4e and e26c3b5.

📒 Files selected for processing (2)
  • components/educateme/sources/common/base.mjs (1 hunks)
  • components/educateme/sources/new-course-created/new-course-created.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-07-24T02:06:47.016Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
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/educateme/sources/new-course-created/new-course-created.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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (2)
components/educateme/sources/common/base.mjs (1)

1-31: LGTM! Base implementation follows abstract pattern correctly.

The base module correctly:

  • Enforces subclass implementation via ConfigurationError for getResources() and generateMeta() (aligns with the abstract-like pattern noted in learnings)
  • Implements defensive iteration with resources || [] on Line 26 (addresses past review concern)
  • Uses standard platform constants for polling interval
  • Provides clean separation between orchestration (run()) and customization hooks
components/educateme/sources/new-course-created/new-course-created.mjs (1)

16-22: The timestamp handling is correct as-is; remove the suggestion to use course.created_at or course.createdAt.

The code uses Date.now() to mark when the event was emitted during the poll, which is the correct pattern for polling sources with dedupe: "unique". The deduplication logic is keyed on course.id, so each unique course is only emitted once. There is no evidence in the educateme API integration that course objects contain creation timestamp fields—using them would likely cause runtime errors. The new-course-activity source follows the same pattern, confirming this is the intended approach.

If you wish to add defensive property checks for robustness, that is optional but reasonable:

 generateMeta(course) {
+  if (!course?.id || !course?.title) {
+    throw new Error("Course missing required properties: id or title");
+  }
   return {
     id: course.id,
     summary: `New course: ${course.title}`,
     ts: Date.now(),
   };
 },

Likely an incorrect or invalid review comment.


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: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17afb0a and 27d3b4e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/educateme/actions/create-course/create-course.mjs (1 hunks)
  • components/educateme/actions/find-courses/find-courses.mjs (1 hunks)
  • components/educateme/actions/get-course-activities/get-course-activities.mjs (1 hunks)
  • components/educateme/educateme.app.mjs (1 hunks)
  • components/educateme/package.json (2 hunks)
  • components/educateme/sources/common/base.mjs (1 hunks)
  • components/educateme/sources/new-course-activity/new-course-activity.mjs (1 hunks)
  • components/educateme/sources/new-course-created/new-course-created.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-07-24T02:06:47.016Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
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/educateme/sources/new-course-created/new-course-created.mjs
📚 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/educateme/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/educateme/educateme.app.mjs
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.

Applied to files:

  • components/educateme/actions/create-course/create-course.mjs
🧬 Code graph analysis (2)
components/educateme/actions/find-courses/find-courses.mjs (1)
components/educateme/educateme.app.mjs (1)
  • courses (12-12)
components/educateme/educateme.app.mjs (1)
components/educateme/actions/find-courses/find-courses.mjs (1)
  • courses (36-43)
⏰ 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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (17)
components/educateme/package.json (1)

3-3: LGTM!

The version bump to 0.1.0 appropriately reflects the addition of new components, and the @pipedream/platform dependency is correctly added to support the polling sources and configuration error handling.

Also applies to: 14-17

components/educateme/sources/new-course-created/new-course-created.mjs (2)

11-15: LGTM!

The getResources implementation correctly retrieves courses via the app's listCourses method.


16-22: LGTM!

The generateMeta implementation appropriately constructs event metadata with the course ID, a descriptive summary, and a timestamp.

components/educateme/sources/new-course-activity/new-course-activity.mjs (3)

1-10: LGTM!

The source metadata is correctly defined with proper documentation link formatting.


11-19: LGTM!

The props section correctly extends the common props and adds the courseId propDefinition.


20-35: LGTM!

The methods correctly implement resource retrieval and metadata generation. The destructuring of result from the API response is consistent with the API's response format.

components/educateme/actions/create-course/create-course.mjs (2)

52-67: LGTM!

The run method correctly invokes the API, handles the response appropriately, and exports a well-formatted summary message.


14-51: Verify prop alignment with PR objectives and API documentation.

The PR objectives specify required props as "course title, description, teacher ID" and optional props as "duration, maximum learners," but this implementation includes title while missing description and teacherId. Additionally, the implementation includes type, previewUrl, withProgramSyncing, and duplicatedCourseId which are not mentioned in the stated objectives.

Confirm whether these differences reflect API documentation that diverges from the issue requirements, or if the prop definitions need adjustment to match the specification.

components/educateme/sources/common/base.mjs (2)

1-15: LGTM!

The imports and props are correctly configured using the Pipedream platform utilities and timer interface.


17-19: Declare getResources as async.

The run method calls await this.getResources(), but the base implementation is not declared as async. Child implementations are async, so the base should match.

Apply this diff:

-    async getResources() {
+    async getResources() {
       throw new ConfigurationError("getResources method must be implemented");
     },

Wait, the code already shows it's NOT async. Let me check the run method... line 25 shows await this.getResources(). The base should be async to match.

Actually, looking at the code again at line 17, it doesn't have async. Apply this diff:

-    getResources() {
+    async getResources() {
       throw new ConfigurationError("getResources method must be implemented");
     },

Likely an incorrect or invalid review comment.

components/educateme/actions/find-courses/find-courses.mjs (2)

14-34: Verify filter props against PR objectives.

The PR objectives specify optional filters as "course ID, teacher ID," but this implementation provides learnerEmail, isFinished, and isSuspended instead. This suggests the API documentation may differ from the issue description.

Please confirm this alignment is intentional.


35-48: LGTM!

The response handling is consistent with how listCourses is used in new-course-created source, and the summary message properly handles singular/plural forms.

components/educateme/actions/get-course-activities/get-course-activities.mjs (1)

14-22: LGTM!

The props correctly reference the courseId propDefinition from the Educateme app module.

components/educateme/educateme.app.mjs (4)

1-1: LGTM!

The axios import from @pipedream/platform is correct for making HTTP requests.


49-55: LGTM!

The createCourse method correctly constructs a POST request to the /courses endpoint, consistent with the action's usage pattern.


35-48: Verify inconsistent API response formats.

The code shows different response handling patterns:

  • listCourses returns an array directly (used with .map() and .length)
  • listCourseActivities returns an object with a result property (both usages destructure { result })

This reflects different response structures from the API endpoints (/courses vs /courses/{courseId}/lessons). Please confirm this API design is intentional and document it to prevent confusion.


21-34: Ensure auth properties api_url and api_key are configured in the app's authentication setup.

The methods reference this.$auth.api_url and this.$auth.api_key. In Pipedream, these properties are provided at runtime from the app's authentication configuration. Verify that users connecting the educateme app configure these required fields when setting up their credentials.

Copy link
Collaborator

@GTFalcao GTFalcao left a comment

Choose a reason for hiding this comment

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

LGTM!

@vunguyenhung
Copy link
Collaborator

For Integration QA:

@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test reports

@michelle0927 michelle0927 merged commit e1a5952 into master Dec 4, 2025
10 checks passed
@michelle0927 michelle0927 deleted the issue-13450 branch December 4, 2025 15:37
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] educateme

4 participants