Skip to content

Conversation

@destitutus
Copy link
Member

@destitutus destitutus commented Nov 6, 2025

see https://bugtracker.codiodev.com/issue/codio-17247

Summary by CodeRabbit

  • New Features

    • Added ability to manage course teachers with optional read-only access
    • Expanded course data model with creation date, archive status, start date, timezone, and tags
    • New APIs for creating courses and modules
  • Documentation

    • Updated API documentation with new course management methods
    • Added example scripts demonstrating new functionality
  • Chores

    • Updated GitHub Actions workflow versions
    • Updated IDE ignore patterns
    • Version bumped to 0.17.0

@destitutus
Copy link
Member Author

@coderabbitai full review, summary

@coderabbitai
Copy link

coderabbitai bot commented Nov 6, 2025

@destitutus: I'll perform a full review of all the changes in this PR and regenerate the summary.

✅ Actions performed

Summary regeneration triggered.

@coderabbitai
Copy link

coderabbitai bot commented Nov 6, 2025

Walkthrough

This PR upgrades GitHub Actions dependencies (checkout v2→v5, setup-node v3→v6), expands the Course type with new fields (description, start, end, timezone, tags, creationDate, archivedDate, archived), introduces three new public APIs (addTeacher, createCourse, createModule), includes example usage, and bumps the package version to 0.17.0.

Changes

Cohort / File(s) Change Summary
GitHub Actions Workflows
.github/workflows/lint.yaml, .github/workflows/publish.yaml
Upgraded action versions: checkout v2→v5 and v3→v5 respectively; setup-node upgraded v3→v6 in publish workflow. Minor formatting adjustments with blank lines added.
Project Configuration
package.json, .gitignore
Version bumped from 0.16.0 to 0.17.0; added IDE-related ignore patterns (*.ipr, *.iws) to .gitignore.
API Documentation
README.md
Expanded Course type documentation with new fields (creationDate, archivedDate, archived, start, timezone, tags, description); documented three new public APIs: addTeacher, createCourse, createModule; introduced CreateCourseRequest type.
Core Library Implementation
src/lib/course.ts
Added optional fields to Course type (description, start, end, timezone, tags); implemented new addTeacher function with POST endpoint integration and error handling; updated internal flattenAssignments to convert date fields; exported addTeacher in public course API.
Example Scripts & Data
examples/course/addTeacher.js, examples/data.js
New example script demonstrating addTeacher usage with read-only teacher assignment; added userIdToAdd constant to examples/data.js exports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the addTeacher function's error handling path correctly serializes error.json when available
  • Confirm Course type changes (new optional fields) maintain backward compatibility with existing code
  • Ensure the flattenAssignments date conversion logic in src/lib/course.ts handles undefined start/end values correctly
  • Validate that the new example follows established patterns in the examples directory
✨ 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 17247_add_teacher

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bacfb4b and 731208f.

📒 Files selected for processing (8)
  • .github/workflows/lint.yaml (2 hunks)
  • .github/workflows/publish.yaml (1 hunks)
  • .gitignore (1 hunks)
  • README.md (5 hunks)
  • examples/course/addTeacher.js (1 hunks)
  • examples/data.js (1 hunks)
  • package.json (1 hunks)
  • src/lib/course.ts (4 hunks)

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

@destitutus destitutus merged commit d62a8d9 into master Nov 6, 2025
2 checks passed
@destitutus destitutus deleted the 17247_add_teacher branch November 6, 2025 16:18
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.

3 participants