CLI documentation

A CLI tool for administrating large amounts of git repositories on GitHub and GitLab instances. Read the docs at: https://repobee.readthedocs.io

Loaded plugins: defaults-2.4.0

usage: repobee [-h] [-v]
               {setup,update,clone,create-teams,migrate,open-issues,close-issues,list-issues,assign-reviews,check-reviews,end-reviews,show-config,verify-settings,config-wizard}
               ...

Positional Arguments

subparser Possible choices: setup, update, clone, create-teams, migrate, open-issues, close-issues, list-issues, assign-reviews, check-reviews, end-reviews, show-config, verify-settings, config-wizard

Named Arguments

-v, --version Display version info

Sub-commands:

setup

Setup student repositories based on master repositories. This command performs three primary actions: sets up the student teams, creates one student repository for each master repository and finally pushes the master repo files to the corresponding student repos. It is perfectly safe to run this command several times, as any previously performed step will simply be skipped.

repobee setup [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
              (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...])
              [--mo MASTER_ORG_NAME] --mn MASTER_REPO_NAMES
              [MASTER_REPO_NAMES ...] [--hook-results-file HOOK_RESULTS_FILE]

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mo, --master-org-name
 Name of the organization containing the master repos. Defaults to the same value as -o|–org-name if left unspecified. Note that config values take precedence over this default.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
--hook-results-file
 Path to a file to store results from plugin hooks in. The results are stored as JSON, regardless of file extension.

update

Push changes from master repos to student repos. If the –issue option is provided, the specified issue is opened in any repo to which pushes fail (because the students have pushed something already).

repobee update [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
               (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...])
               [--mo MASTER_ORG_NAME] --mn MASTER_REPO_NAMES
               [MASTER_REPO_NAMES ...] [-i ISSUE]

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mo, --master-org-name
 Name of the organization containing the master repos. Defaults to the same value as -o|–org-name if left unspecified. Note that config values take precedence over this default.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
-i, --issue Path to issue to open in repos to which pushes fail. Assumes that the first line is the title of the issue.

clone

Clone student repos asynchronously in bulk.

repobee clone [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
              (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...])
              (--mn MASTER_REPO_NAMES [MASTER_REPO_NAMES ...] | --discover-repos)
              [--hook-results-file HOOK_RESULTS_FILE]

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
--discover-repos
 

Discover all repositories for the specified students. NOTE: This is expensive in terms of API requests, if you have a rate limit you may want to avoid this option.

Default: False

--hook-results-file
 Path to a file to store results from plugin hooks in. The results are stored as JSON, regardless of file extension.

create-teams

Only create student teams. This is intended for when you want to use RepoBee for management, but don’t want to dictate the names of your student’s repositories. The setup command performs this step automatically, so there is never a need to run both this command AND setup.

repobee create-teams [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
                     (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...])

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.

migrate

Migrate repositories into the target organization. The repos must be local on disk to be migrated. Note that migrated repos will be private.

repobee migrate [-h] --mn MASTER_REPO_NAMES [MASTER_REPO_NAMES ...] -u USER -o
                ORG_NAME --bu BASE_URL -t TOKEN [--tb]

Named Arguments

--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

open-issues

Open issues in student repositories. For each master repository specified, the student list is traversed. For every student repo found, the issue specified by the –issue option is opened. NOTE: The first line of the issue file is assumed to be the issue title!

repobee open-issues [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
                    (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...]) --mn
                    MASTER_REPO_NAMES [MASTER_REPO_NAMES ...] -i ISSUE

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
-i, --issue Path to an issue. The first line is assumed to be the title.

close-issues

Close issues in student repos based on a regex. For each master repository specified, the student list is traversed. For every student repo found, any open issues matching the –title-regex are closed.

repobee close-issues [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
                     (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...])
                     (--mn MASTER_REPO_NAMES [MASTER_REPO_NAMES ...] | --discover-repos)
                     -r TITLE_REGEX

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
--discover-repos
 

Discover all repositories for the specified students. NOTE: This is expensive in terms of API requests, if you have a rate limit you may want to avoid this option.

Default: False

-r, --title-regex
 Regex to match titles against. Any issue whose title matches the regex will be closed.

list-issues

List issues in student repos.

repobee list-issues [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
                    (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...])
                    (--mn MASTER_REPO_NAMES [MASTER_REPO_NAMES ...] | --discover-repos)
                    [--hook-results-file HOOK_RESULTS_FILE] [-r TITLE_REGEX]
                    [-b] [-a AUTHOR] [--open | --closed | --all]

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
--discover-repos
 

Discover all repositories for the specified students. NOTE: This is expensive in terms of API requests, if you have a rate limit you may want to avoid this option.

Default: False

--hook-results-file
 Path to a file to store results from plugin hooks in. The results are stored as JSON, regardless of file extension.
-r, --title-regex
 Regex to match against titles. Only issues matching this regex will be listed.
-b, --show-body
 

Show the body of the issue, alongside the default info.

Default: False

-a, --author Only show issues by this author.
--open

List open issues (default).

Default: IssueState.OPEN

--closed

List closed issues.

Default: IssueState.OPEN

--all

List all issues (open and closed).

Default: IssueState.OPEN

assign-reviews

For each student repo, create a review team with read access named <student-repo-name>-review and randomly assign other students to it. All students are assigned to the same amount of review teams, as specified by –num-reviews. Note that –num-reviews must be strictly less than the amount of students. Note that review allocation strategy may be altered by plugins.

repobee assign-reviews [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
                       (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...]) --mn
                       MASTER_REPO_NAMES [MASTER_REPO_NAMES ...] [-n N]
                       [-i ISSUE]

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
-n, --num-reviews
 

Assign each student to review n repos (consequently, each repo is reviewed by n students). n must be strictly smaller than the amount of students.

Default: 1

-i, --issue Path to an issue to open in student repos. If specified, this issue will be opened in each student repo, and the body will be prepended with user mentions of all students assigned to review the repo. NOTE: The first line is assumed to be the title.

check-reviews

Check which students have opened review review issues in their assigned repos. As it is possible for students to leave the peer review teams on their own, the command checks that each student is assigned to the expected amound of teams. There is currently no way to check if students have been swapped around, so using this command fow grading purposes is not recommended.

repobee check-reviews [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
                      (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...]) --mn
                      MASTER_REPO_NAMES [MASTER_REPO_NAMES ...] -r TITLE_REGEX
                      -n N

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.
-r, --title-regex
 Regex to match against titles. Only issues matching this regex will count as review issues.
-n, --num-reviews
 The expected amount of reviews each student should be assigned to perform. If a student is not assigned to num_reviews review teams, warnings will be displayed.

end-reviews

Delete review allocations assigned with assign-reviews. This is a destructive action, as the allocations for reviews are irreversibly deleted. The purpose of this command is to revoke the reviewers’ read access to reviewed repos, and to clean up the allocations (i.e. deleting the review teams when using GitHub, or groups when using GitLab). It will however not do anything with the review issues. You can NOT run check-reviews after end-reviews, as the former needs the allocations to function properly. Use this command only when reviews are done.

repobee end-reviews [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
                    (--sf STUDENTS_FILE | -s STUDENTS [STUDENTS ...]) --mn
                    MASTER_REPO_NAMES [MASTER_REPO_NAMES ...]

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--sf, --students-file
 Path to a list of student usernames. Put multiple usernames on each line to form groups.
-s, --students One or more whitespace separated student usernames.
--mn, --master-repo-names
 One or more names of master repositories. Names must either refer to local directories, or to master repositories in the target organization.

show-config

Show the contents of the configuration file. If no configuration file can be found, show the path where repobee expectes to find it.

repobee show-config [-h] [--tb]

Named Arguments

--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

verify-settings

Verify core settings by trying various API requests.

repobee verify-settings [-h] -u USER -o ORG_NAME --bu BASE_URL -t TOKEN [--tb]
                        [--mo MASTER_ORG_NAME]

Named Arguments

-u, --user Your username.
-o, --org-name Name of the target organization
--bu, --base-url
 Base url to a platform API. Must be HTTPS. For example, with github.com, the base url is https://api.github.com, and with GitHub enterprise, the url is https://<ENTERPRISE_HOST>/api/v3
-t, --token Access token for the platform instance. Can also be specified in the REPOBEE_TOKEN environment variable.
--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False

--mo, --master-org-name
 Name of the organization containing the master repos. Defaults to the same value as -o|–org-name if left unspecified. Note that config values take precedence over this default.

config-wizard

A configuration wizard that sets up the configuration file.Warns if there already is a configuration file, as it will be overwritten.

repobee config-wizard [-h] [--tb]

Named Arguments

--tb, --traceback
 

Show the full traceback of critical exceptions.

Default: False