Conversation
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.