feat: Add some GitHub Classroom API endpoints by jferrl · Pull Request #3690 · google/go-github

added 4 commits

August 18, 2025 23:14
Implements the GetClassroom method to retrieve a GitHub Classroom by ID if the user is an administrator. Adds corresponding unit tests to verify correct API interaction and response handling.
Updated the addOptions function to use reflect.Pointer instead of the deprecated reflect.Ptr for checking pointer kinds. This change ensures compatibility with newer Go versions.
Implements the ListClassrooms method to retrieve classrooms for the current user via the GitHub API. Adds corresponding tests to verify correct API interaction and response parsing.
Implements the ListClassroomAssignments method to fetch assignments for a classroom via the GitHub API. Includes comprehensive tests for the new method, covering normal operation and error handling.
Updated the usage of reflect.Ptr to reflect.Pointer in the stringifyValue function to align with the latest Go reflect package conventions.
Replaces usage of http.MethodGet with the string literal "GET" in both the ClassroomService methods and their corresponding tests. Also removes the unused net/http import.

@gmlewis

@gmlewis

gmlewis

@jferrl

Revised comments in classroom.go to clarify method descriptions and improve wording for GetClassroom and ListClassrooms functions.
Replaces GitHub and GitHub Classroom URLs with example.com in classroom and assignment test cases for consistency and to avoid referencing real endpoints.

stevehipwell

gmlewis

gmlewis

@jferrl

Introduces test cases for invalid input options in GetAssignment, GetClassroom, ListClassrooms, and ListClassroomAssignments methods to improve error handling coverage.

@jferrl jferrl deleted the jferrl-jferrl-3684 branch

September 24, 2025 07:59