Configure default settings for assignment repositories

You can use the Probot Settings app to configure the default settings for repositories that GitHub Classroom creates for an assignment.

Organization owners can configure default settings for assignment repositories by installing a GitHub App for the organization.

In this article

About configuration of defaults for assignment repositories

GitHub Classroom creates a repository that belongs for each student or team that accepts an assignment. The repository belongs to the organization that you use for GitHub Classroom. Assignment repositories can be empty, or you can use a template repository. For more information, see "Create an assignment from a template repository."

You may want to predefine the default settings for the assignment repositories that GitHub Classroom creates from a template repository. For example, you may want to disable issues, define labels for pull requests, or protect a branch in some or all of the repositories.

With the Probot Settings app, you can create a file named .github/settings.yml in a repository that contains a list of settings for the repository, and then install a GitHub App for your organization that automatically applies the settings to the repository.

You can include .github/settings.yml in a template repository that you use for an assignment in GitHub Classroom. When an individual or team accepts the assignment, GitHub Classroom creates the assignment repository, and the Settings app automatically applies the settings from .github/settings.yml.

Probot is a a project, framework, and collection of free apps to automate GitHub. A Probot app can listen to repository events, like the creation of new commits, comments, and issues, and automatically respond to the event.

For more information, see the Probot website and the Settings app website. For more information about GitHub Apps, see "About apps."

Adding the Settings app to your organization

After you install the Probot Settings app for your organization, the app will apply the settings that you define in .github/settings.yml for any repository in your organization, including new assignment repositories that GitHub Classroom creates.

  1. Navigate to the Settings app page.
  2. Click Install, then click the organization that you use for GitHub Classroom. Provide the app full access to all repositories owned by the organization.
    Installing the Probot Settings app

Configuring default settings for an assignment repository

  1. Create a template repository that contains a .github/settings.yml file. For a complete list of settings, see the README for the probot/settings repository. For more information about using a template repository for starter code in GitHub Classroom, see "Create an assignment from a template repository."

    Warning: Do not define collaborators in the .github/settings.yml file for your template repository. GitHub Classroom automatically grants teachers and teaching assistants access to assignment repositories.

  2. Create an assignment using the template repository containing .github/settings.yml as the starter code. For more information, see "Create an individual assignment" or "Create a group assignment."

The Probot Settings app for your organization will now apply the settings you define in .github/settings.yml within the template repository to every assignment repository that You may want to predefine the default settings for the assignment repositories that GitHub Classroom creates from a template repository. For example, you may want to disable issues, define labels for pull requests, or protect a branch in some or all of the repositories. creates for a student or team.

Further reading

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.