Organization¶
-
class
github.Organization.
Organization
¶ This class represents Organizations. The reference can be found here https://docs.github.com/en/rest/reference/orgs
-
add_to_members
(member: NamedUser, role: Opt[str] = NotSet) → None¶
-
add_to_public_members
(public_member: NamedUser) → None¶
-
create_fork
(repo: Repository, name: Opt[str] = NotSet, default_branch_only: Opt[bool] = NotSet) → Repository¶
-
create_repo_from_template
(name: str, repo: Repository, description: Opt[str] = NotSet, private: Opt[bool] = NotSet) → Repository¶ self.name :calls: POST /repos/{template_owner}/{template_repo}/generate
-
create_hook
(name: str, config: dict[str, str], events: Opt[list[str]] = NotSet, active: Opt[bool] = NotSet) → Hook¶ - Calls
- Parameters
name – string
config – dict
events – list of string
active – bool
- Return type
-
create_project
(name: str, body: Union[str, github.GithubObject._NotSetType] = NotSet) → github.Project.Project¶
-
create_repo
(name: str, description: Union[str, github.GithubObject._NotSetType] = NotSet, homepage: Union[str, github.GithubObject._NotSetType] = NotSet, private: Union[bool, github.GithubObject._NotSetType] = NotSet, visibility: Union[str, github.GithubObject._NotSetType] = NotSet, has_issues: Union[bool, github.GithubObject._NotSetType] = NotSet, has_wiki: Union[bool, github.GithubObject._NotSetType] = NotSet, has_downloads: Union[bool, github.GithubObject._NotSetType] = NotSet, has_projects: Union[bool, github.GithubObject._NotSetType] = NotSet, team_id: Union[int, github.GithubObject._NotSetType] = NotSet, auto_init: Union[bool, github.GithubObject._NotSetType] = NotSet, license_template: Union[str, github.GithubObject._NotSetType] = NotSet, gitignore_template: Union[str, github.GithubObject._NotSetType] = NotSet, allow_squash_merge: Union[bool, github.GithubObject._NotSetType] = NotSet, allow_merge_commit: Union[bool, github.GithubObject._NotSetType] = NotSet, allow_rebase_merge: Union[bool, github.GithubObject._NotSetType] = NotSet, delete_branch_on_merge: Union[bool, github.GithubObject._NotSetType] = NotSet, allow_update_branch: Union[bool, github.GithubObject._NotSetType] = NotSet) → github.Repository.Repository¶ - Calls
-
create_secret
(secret_name: str, unencrypted_value: str, visibility: str = 'all', selected_repositories: Opt[list[github.Repository.Repository]] = NotSet) → github.OrganizationSecret.OrganizationSecret¶
-
get_secrets
() → PaginatedList[OrganizationSecret]¶ Gets all organization secrets :rtype:
PaginatedList
ofgithub.OrganizationSecret.OrganizationSecret
-
get_secret
(secret_name: str) → OrganizationSecret¶ - Calls
‘GET /orgs/{org}/actions/secrets/{secret_name} <https://docs.github.com/en/rest/actions/secrets#get-an-organization-secret>`_
- Parameters
secret_name – string
- Return type
-
create_team
(name: str, repo_names: Opt[list[Repository]] = NotSet, permission: Opt[str] = NotSet, privacy: Opt[str] = NotSet, description: Opt[str] = NotSet) → Team¶ - Calls
- Parameters
name – string
repo_names – list of
github.Repository.Repository
permission – string
privacy – string
description – string
- Return type
-
create_variable
(variable_name: str, value: str, visibility: str = 'all', selected_repositories: github.GithubObject.Opt[list[github.Repository.Repository]] = NotSet) → github.OrganizationVariable.OrganizationVariable¶ - Calls
- Parameters
variable_name – string
value – string
visibility – string
selected_repositories – list of
github.Repository.Repository
- Return type
-
get_variables
() → PaginatedList[OrganizationVariable]¶ Gets all organization variables :rtype:
PaginatedList
ofgithub.OrganizationVariable.OrganizationVariable
-
get_variable
(variable_name: str) → OrganizationVariable¶ - Calls
‘GET /orgs/{org}/actions/variables/{variable_name} <https://docs.github.com/en/rest/actions/variables#get-an-organization-variable>`_
- Parameters
variable_name – string
- Return type
-
delete_hook
(id: int) → None¶ - Calls
- Parameters
id – integer
- Return type
None`
-
edit
(billing_email: Union[str, github.GithubObject._NotSetType] = NotSet, blog: Union[str, github.GithubObject._NotSetType] = NotSet, company: Union[str, github.GithubObject._NotSetType] = NotSet, description: Union[str, github.GithubObject._NotSetType] = NotSet, email: Union[str, github.GithubObject._NotSetType] = NotSet, location: Union[str, github.GithubObject._NotSetType] = NotSet, name: Union[str, github.GithubObject._NotSetType] = NotSet) → None¶ - Calls
-
edit_hook
(id: int, name: str, config: dict[str, str], events: Opt[list[str]] = NotSet, active: Opt[bool] = NotSet) → Hook¶
-
get_events
() → PaginatedList[Event]¶ - Calls
- Return type
PaginatedList
ofgithub.Event.Event
-
get_hook
(id: int) → github.Hook.Hook¶
-
get_hooks
() → PaginatedList[Hook]¶ - Calls
-
get_hook_delivery
(hook_id: int, delivery_id: int) → github.HookDelivery.HookDelivery¶ - Calls
- Parameters
hook_id – integer
delivery_id – integer
- Return type
-
get_hook_deliveries
(hook_id: int) → github.PaginatedList.PaginatedList[github.HookDelivery.HookDeliverySummary][github.HookDelivery.HookDeliverySummary]¶ - Calls
- Parameters
hook_id – integer
- Return type
PaginatedList
ofgithub.HookDelivery.HookDeliverySummary
-
get_issues
(filter: Opt[str] = NotSet, state: Opt[str] = NotSet, labels: Opt[list[Label]] = NotSet, sort: Opt[str] = NotSet, direction: Opt[str] = NotSet, since: Opt[datetime] = NotSet) → PaginatedList[Issue]¶ - Calls
- Return type
PaginatedList
ofgithub.Issue.Issue
- Parameters
filter – string
state – string
labels – list of
github.Label.Label
sort – string
direction – string
since – datetime
- Return type
PaginatedList
ofgithub.Issue.Issue
-
get_members
(filter_: Opt[str] = NotSet, role: Opt[str] = NotSet) → PaginatedList[NamedUser]¶ - Calls
-
get_projects
(state: Opt[str] = NotSet) → PaginatedList[Project]¶ - Calls
-
get_public_members
() → PaginatedList[NamedUser]¶ - Calls
- Return type
PaginatedList
ofgithub.NamedUser.NamedUser
-
get_outside_collaborators
(filter_: Opt[str] = NotSet) → PaginatedList[NamedUser]¶
-
remove_outside_collaborator
(collaborator: NamedUser) → None¶ - Calls
- Parameters
collaborator –
github.NamedUser.NamedUser
- Return type
None
-
convert_to_outside_collaborator
(member: NamedUser) → None¶ - Calls
- Parameters
member –
github.NamedUser.NamedUser
- Return type
None
-
get_public_key
() → PublicKey¶ - Calls
- Return type
-
get_repo
(name: str) → Repository¶ - Calls
- Parameters
name – string
- Return type
-
get_repos
(type: Opt[str] = NotSet, sort: Opt[str] = NotSet, direction: Opt[str] = NotSet) → PaginatedList[Repository]¶ - Calls
- Parameters
type – string (‘all’, ‘public’, ‘private’, ‘forks’, ‘sources’, ‘member’)
sort – string (‘created’, ‘updated’, ‘pushed’, ‘full_name’)
direction – string (‘asc’, desc’)
-
get_team
(id: int) → Team¶ - Calls
-
get_team_by_slug
(slug: str) → Team¶
-
get_teams
() → PaginatedList[Team]¶ - Calls
-
invitations
() → PaginatedList[NamedUser]¶
-
invite_user
(user: Opt[NamedUser] = NotSet, email: Opt[str] = NotSet, role: Opt[str] = NotSet, teams: Opt[list[Team]] = NotSet) → None¶ - Calls
- Parameters
user –
github.NamedUser.NamedUser
email – string
role – string
teams – array of
github.Team.Team
- Return type
None
-
cancel_invitation
(invitee: NamedUser) → bool¶ - Calls
- Parameters
invitee –
github.NamedUser.NamedUser
- Return type
None
-
has_in_members
(member: NamedUser) → bool¶ - Calls
- Parameters
member –
github.NamedUser.NamedUser
- Return type
bool
-
has_in_public_members
(public_member: NamedUser) → bool¶ - Calls
- Parameters
public_member –
github.NamedUser.NamedUser
- Return type
bool
-
remove_from_membership
(member: NamedUser) → None¶ - Calls
- Parameters
member –
github.NamedUser.NamedUser
- Return type
None
-
remove_from_members
(member: NamedUser) → None¶ - Calls
- Parameters
member –
github.NamedUser.NamedUser
- Return type
None
-
remove_from_public_members
(public_member: NamedUser) → None¶ - Calls
- Parameters
public_member –
github.NamedUser.NamedUser
- Return type
None
-
create_migration
(repos: list[str], lock_repositories: Opt[bool] = NotSet, exclude_attachments: Opt[bool] = NotSet) → Migration¶ - Calls
- Parameters
repos – list or tuple of str
lock_repositories – bool
exclude_attachments – bool
- Return type
-
get_migrations
() → PaginatedList[Migration]¶ - Calls
- Return type
PaginatedList
ofgithub.Migration.Migration
-
get_installations
() → PaginatedList[Installation]¶ - Calls
- Return type
PaginatedList
ofgithub.Installation.Installation
-