Repository Operations¶
GitHub Organization Tools supports basic repository operations within an organization. You can clone, pull updates, or delete repositories in bulk.
Creating repositories¶
To create repositories in a GitHub organization, use the following command:
<org>
: The name of the GitHub organization.<csv>
: Path to a CSV file listing repositories to create.--dry
(optional): Simulates the creation process without actually creating the repositories. It still checks for the existence of the organization and the repositories.--public
(optional): Creates the repositories as public. By default, repositories are created as private.-
--private
(optional): Creates the repositories as private. This is the default behavior.Note: You can use either
--public
or--private
. If both are specified,--private
will take precedence.
This command uses the following fields:
repo
: The name of the repository to be created.description
: A description for the repository.
See CSV Format for format and options
Cloning repositories¶
To clone multiple repositories from an organization:
<org>
: The name of the GitHub organization.<csv>
: Path to a CSV file listing repositories to clone.-d
,--destination
(optional): Directory where the repositories will be cloned. Defaults to the current directory.--dry
(optional): Lists the repositories that would be cloned, without performing any actions.-
--ssh
(optional): Clones the repositories using SSH instead of HTTPS. This is useful if you have SSH keys set up for authentication.Note: If you use
--ssh
, ensure that your SSH keys are properly configured in your GitHub account and device.
This command uses the following fields:
id
: Directory where the repository will be cloned.repo
: The name of the repository to be cloned.
See CSV Format for format and options
Pulling repositories¶
To pull the latest changes for a list of previously cloned repositories:
<csv>
: Path to a CSV file listing repositories to pull.-d|--destination
(optional): Directory where the repositories will be cloned. Defaults to the current directory.--dry
(optional): Lists which repositories would be updated, without making any changes.
This command uses the following fields:
id
: Directory where the repository exists on the device.
See CSV Format for format and options
Deleting repositories¶
To delete repositories from an organization in GitHub, use the following command:
<org>
: The name of the GitHub organization.<csv>
: Path to a CSV file listing repositories to delete.--dry
(optional): Shows which repositories would be deleted, without making any changes.-f|--force
(optional): Skips confirmation and deletes the repositories without prompting.
This command uses the following fields:
repo
: The name of the repository to be deleted.
See CSV Format for format and options
Inviting users as collaborators¶
To invite users to repositories in a GitHub organization, use the following command:
<org>
: The name of the GitHub organization.<csv>
: Path to a CSV file listing users and repositories.--dry
(optional): Simulates the invitation process without actually sending invitations. It still checks for the existence of the organization and the repositories.
This command uses the following fields:
username
: The GitHub username of the user to be invited.repo
: The name of the repository to which the user will be invited.
See CSV Format for format and options
Creating issues¶
To create issues in multiple repositories with the same title and body, use the following command:
<org>
: The name of the GitHub organization.<csv>
: Path to a CSV file listing repositories.<title>
: The title of the issue to be created.<body>
: The body content of the issue to be created.--dry
(optional): Simulates the issue creation process without actually creating the issues. It still checks for the existence of the organization and the repositories.
This command uses the following fields:
repo
: The name of the repository where the issue will be created.
See CSV Format for format and options