Skip to content

Conversation

ncalteen
Copy link
Contributor

@ncalteen ncalteen commented Apr 2, 2025

No description provided.

@ncalteen ncalteen requested a review from Copilot April 2, 2025 15:58
@ncalteen ncalteen self-assigned this Apr 2, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes support for administrator management and adds support for external instructors by refactoring class request types, GitHub user/team handling, and related actions and tests. Key changes include:

  • Removal of the "administrators" field from the class request type and associated parsing logic.
  • Updates to GitHub organization member removal logic to exempt users listed as instructors.
  • Removal of add‑admin and remove‑admin actions, corresponding enum cases, and adjustments in tests and workflows.

Reviewed Changes

Copilot reviewed 30 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/types.ts Removed the administrators field from the ClassRequest type.
src/main.ts Removed admin actions from the main action handler.
src/github/users.ts Updated user removal logic to check the instructors list.
src/github/teams.ts Eliminated role parameter when adding users to a team (defaulted to 'member').
src/github/issues.ts Removed administrator parsing and updated error messages.
src/events.ts, src/enums.ts, src/actions.ts Eliminated admin-related action handling and tests.
.github/workflows/process-issue-comment.yml Updated workflow to remove admin command triggers.
.github/ISSUE_TEMPLATE/create-class.yml Removed the administrators field from the issue template.
tests/* Removed tests for admin-specific actions and updated instructor tests.
Files not reviewed (4)
  • .eslintrc.yml: Language not supported
  • package.json: Language not supported
  • tsconfig.base.json: Language not supported
  • tsconfig.eslint.json: Language not supported
Comments suppressed due to low confidence (3)

src/github/users.ts:72

  • [nitpick] Clarify the comment to explicitly state that only non-employees who are also not listed as instructors will be removed from the organization, ensuring consistency with the new instructor support.
// Microsoft employee and are not in the instructors list).

src/github/teams.ts:112

  • [nitpick] Document the rationale for removing the role parameter from addUser calls, as the default is now set to 'member', to improve code maintainability.
role: 'member'

src/github/issues.ts:152

  • Ensure that the error message for invalid input correctly and consistently refers to 'attendee' after the removal of administrator handling.
expect(e.message).toBe("Invalid Attendee:  (must be 'handle,email' format)")

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@ncalteen ncalteen merged commit b2917f2 into main Apr 2, 2025
3 checks passed
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.

1 participant