GitProviderService#

class GitProviderService[source]#

Methods

connect_repository

Connect an existing repository to an assignment.

get_all_repositories

Get all repositories for the given git provider.

create_repository

Create a new repository and connect it to an assignment.

get_all_templates

Get all template repositories for the given git provider.

connect_repository(json_body, *, provider_id, token_id, repository_id, is_test_student, author_id)[source]#

Connect an existing repository to an assignment.

Parameters:
Returns:

A job that will be started to connect and clone the repository.

Return type:

Job

get_all_repositories(*, provider_id, token_id, page_size=20)[source]#

Get all repositories for the given git provider.

Parameters:
  • provider_id (str) – The provider from which you want to retrieve repos.

  • token_id (str) – The token to use to retrieve the repos.

  • page_size (int) – The size of a single page, maximum is 50.

  • self (GitProviderService[AuthenticatedClient]) –

Returns:

The token.

Return type:

Response[GitRepositoryLike]

create_repository(json_body, *, provider_id, token_id, is_test_student, author_id)[source]#

Create a new repository and connect it to an assignment.

Parameters:
Returns:

A job that will be started to connect and clone the repository.

Return type:

Job

get_all_templates(*, provider_id, token_id, page_size=20)[source]#

Get all template repositories for the given git provider.

Note: We do not yet support GitLab templates.

Parameters:
  • provider_id (str) – The provider from which you want to retrieve repos.

  • token_id (str) – The token to use to retrieve the repos.

  • page_size (int) – The size of a single page, maximum is 50.

  • self (GitProviderService[AuthenticatedClient]) –

Returns:

The token.

Return type:

Response[GitRepositoryLike]