Skip to main content

assignments

Creates, updates, deletes, gets or lists an assignments resource.

Overview

Nameassignments
TypeResource
Idgithub.classroom.assignments

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idintegerUnique identifier of the repository.
acceptedintegerThe number of students that have accepted the assignment.
classroomobjectA GitHub Classroom classroom (title: Classroom)
deadlinestring (date-time)The time at which the assignment is due. (example: 2011-01-26T19:06:43Z)
editorstringThe selected editor for the assignment. (example: codespaces)
feedback_pull_requests_enabledbooleanWhether feedback pull request will be created when a student accepts the assignment.
invitations_enabledbooleanWhether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment.
invite_linkstringThe link that a student can use to accept the assignment. (example: https://classroom.github.com/a/Lx7jiUgx)
languagestringThe programming language used in the assignment. (example: elixir)
max_membersintegerThe maximum allowable members per team.
max_teamsintegerThe maximum allowable teams for the assignment.
passingintegerThe number of students that have passed the assignment.
public_repobooleanWhether an accepted assignment creates a public repository.
slugstringSluggified name of the assignment. (example: intro-to-binaries)
starter_code_repositoryobjectA GitHub repository view for Classroom (title: Simple Classroom Repository)
students_are_repo_adminsbooleanWhether students are admins on created repository when a student accepts the assignment.
submittedintegerThe number of students that have submitted the assignment.
titlestringAssignment title. (example: Intro to Binaries)
typestringWhether it's a group assignment or individual assignment. (individual, group) (example: individual)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_an_assignmentselectassignment_idGets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
assignment_idintegerThe unique identifier of the classroom assignment.

SELECT examples

Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.

SELECT
id,
accepted,
classroom,
deadline,
editor,
feedback_pull_requests_enabled,
invitations_enabled,
invite_link,
language,
max_members,
max_teams,
passing,
public_repo,
slug,
starter_code_repository,
students_are_repo_admins,
submitted,
title,
type
FROM github.classroom.assignments
WHERE assignment_id = '{{ assignment_id }}' -- required
;