Organization¶
-
class
github.Organization.
Organization
¶ This class represents Organizations. The reference can be found here https://docs.github.com/en/rest/reference/orgs
-
avatar_url
¶ Type: string
-
billing_email
¶ Type: string
-
blog
¶ Type: string
-
collaborators
¶ Type: integer
-
company
¶ Type: string
-
created_at
¶ Type: datetime.datetime
-
default_repository_permission
¶ Type: string
-
description
¶ Type: string
-
disk_usage
¶ Type: integer
-
email
¶ Type: string
-
events_url
¶ Type: string
-
followers
¶ Type: integer
-
following
¶ Type: integer
-
gravatar_id
¶ Type: string
-
has_organization_projects
¶ Type: bool
-
has_repository_projects
¶ Type: bool
-
hooks_url
¶ Type: string
-
html_url
¶ Type: string
-
id
¶ Type: integer
-
issues_url
¶ Type: string
-
location
¶ Type: string
-
login
¶ Type: string
-
members_can_create_repositories
¶ Type: bool
-
members_url
¶ Type: string
-
name
¶ Type: string
-
owned_private_repos
¶ Type: integer
-
plan
¶ Type: github.Plan.Plan
-
private_gists
¶ Type: integer
-
public_gists
¶ Type: integer
-
public_members_url
¶ Type: string
-
public_repos
¶ Type: integer
-
repos_url
¶ Type: string
-
total_private_repos
¶ Type: integer
-
two_factor_requirement_enabled
¶ Type: bool
-
type
¶ Type: string
-
updated_at
¶ Type: datetime.datetime
-
url
¶ Type: string
-
add_to_members
(member, role=NotSet)¶ Calls: Parameters: - member –
github.NamedUser.NamedUser
- role – string
Return type: None
- member –
-
add_to_public_members
(public_member)¶ Calls: PUT /orgs/{org}/public_members/{user} Parameters: public_member – github.NamedUser.NamedUser
Return type: None
-
create_fork
(repo, name=NotSet, default_branch_only=NotSet)¶ Calls: Parameters: - repo –
github.Repository.Repository
- name – string
- default_branch_only – bool
Return type: - repo –
-
create_repo_from_template
(name, repo, description=NotSet, private=NotSet)¶ self.name :calls: POST /repos/{template_owner}/{template_repo}/generate :param name: string :param repo
github.Repository.Repository
:param description: string :param private: bool :rtype:github.Repository.Repository
-
create_hook
(name, config, events=NotSet, active=NotSet)¶ Calls: Parameters: - name – string
- config – dict
- events – list of string
- active – bool
Return type:
-
create_project
(name, body=NotSet)¶ Calls: Parameters: - name – string
- body – string
Return type:
-
create_repo
(name, description=NotSet, homepage=NotSet, private=NotSet, visibility=NotSet, has_issues=NotSet, has_wiki=NotSet, has_downloads=NotSet, has_projects=NotSet, team_id=NotSet, auto_init=NotSet, license_template=NotSet, gitignore_template=NotSet, allow_squash_merge=NotSet, allow_merge_commit=NotSet, allow_rebase_merge=NotSet, delete_branch_on_merge=NotSet, allow_update_branch=NotSet)¶ Calls: Parameters: - name – string
- description – string
- homepage – string
- private – bool
- has_issues – bool
- has_wiki – bool
- has_downloads – bool
- has_projects – bool
- team_id – : int
- auto_init – bool
- license_template – string
- gitignore_template – string
- allow_squash_merge – bool
- allow_merge_commit – bool
- allow_rebase_merge – bool
- delete_branch_on_merge – bool
- allow_update_branch – bool
Return type:
-
create_secret
(secret_name, unencrypted_value, visibility='all', selected_repositories=NotSet)¶ Calls: Parameters: - secret_name – string
- unencrypted_value – string
- visibility – string
- selected_repositories – list of
github.Repository.Repository
Return type: bool
-
create_team
(name, repo_names=NotSet, permission=NotSet, privacy=NotSet, description=NotSet)¶ Calls: Parameters: - name – string
- repo_names – list of
github.Repository.Repository
- permission – string
- privacy – string
- description – string
Return type:
-
delete_hook
(id)¶ Calls: DELETE /orgs/{owner}/hooks/{id} Parameters: id – integer Return type: None`
-
delete_secret
(secret_name)¶ Calls: DELETE /orgs/{org}/actions/secrets/{secret_name} Parameters: secret_name – string Return type: bool
-
edit
(billing_email=NotSet, blog=NotSet, company=NotSet, description=NotSet, email=NotSet, location=NotSet, name=NotSet)¶ Calls: Parameters: - billing_email – string
- blog – string
- company – string
- description – string
- email – string
- location – string
- name – string
Return type: None
-
edit_hook
(id, name, config, events=NotSet, active=NotSet)¶ Calls: Parameters: - id – integer
- name – string
- config – dict
- events – list of string
- active – bool
Return type:
-
get_events
()¶ Calls: GET /orgs/{org}/events Return type: github.PaginatedList.PaginatedList
ofgithub.Event.Event
-
get_hook
(id)¶ Calls: GET /orgs/{owner}/hooks/{id} Parameters: id – integer Return type: github.Hook.Hook
-
get_hooks
()¶ Calls: GET /orgs/{owner}/hooks Return type: github.PaginatedList.PaginatedList
ofgithub.Hook.Hook
-
get_issues
(filter=NotSet, state=NotSet, labels=NotSet, sort=NotSet, direction=NotSet, since=NotSet)¶ Calls: Return type: Parameters: - filter – string
- state – string
- labels – list of
github.Label.Label
- sort – string
- direction – string
- since – datetime.datetime
Return type:
-
get_members
(filter_=NotSet, role=NotSet)¶ Calls: Parameters: - filter – string
- role – string
Return type: github.PaginatedList.PaginatedList
ofgithub.NamedUser.NamedUser
-
get_projects
(state=NotSet)¶ Calls: GET /orgs/{org}/projects Return type: github.PaginatedList.PaginatedList
ofgithub.Project.Project
Parameters: state – string
-
get_public_members
()¶ Calls: GET /orgs/{org}/public_members Return type: github.PaginatedList.PaginatedList
ofgithub.NamedUser.NamedUser
-
get_outside_collaborators
(filter_=NotSet)¶ Calls: GET /orgs/{org}/outside_collaborators Parameters: filter – string Return type: github.PaginatedList.PaginatedList
ofgithub.NamedUser.NamedUser
-
remove_outside_collaborator
(collaborator)¶ Calls: DELETE /orgs/{org}/outside_collaborators/{username} Parameters: collaborator – github.NamedUser.NamedUser
Return type: None
-
convert_to_outside_collaborator
(member)¶ Calls: PUT /orgs/{org}/outside_collaborators/{username} Parameters: member – github.NamedUser.NamedUser
Return type: None
-
get_public_key
()¶ Calls: GET /orgs/{org}/actions/secrets/public-key Return type: github.PublicKey.PublicKey
-
get_repo
(name)¶ Calls: GET /repos/{owner}/{repo} Parameters: name – string Return type: github.Repository.Repository
-
get_repos
(type=NotSet, sort=NotSet, direction=NotSet)¶ Calls: Parameters: - type – string (‘all’, ‘public’, ‘private’, ‘forks’, ‘sources’, ‘member’)
- sort – string (‘created’, ‘updated’, ‘pushed’, ‘full_name’)
- direction – string (‘asc’, desc’)
Return type: github.PaginatedList.PaginatedList
ofgithub.Repository.Repository
-
get_team
(id)¶ Calls: GET /teams/{id} Parameters: id – integer Return type: github.Team.Team
-
get_team_by_slug
(slug)¶ Calls: GET /orgs/{org}/teams/{team_slug} Parameters: slug – string Return type: github.Team.Team
-
get_teams
()¶ Calls: GET /orgs/{org}/teams Return type: github.PaginatedList.PaginatedList
ofgithub.Team.Team
-
invitations
()¶ Calls: GET /orgs/{org}/invitations Return type: github.PaginatedList.PaginatedList
ofgithub.NamedUser.NamedUser
-
invite_user
(user=NotSet, email=NotSet, role=NotSet, teams=NotSet)¶ Calls: Parameters: - user –
github.NamedUser.NamedUser
- email – string
- role – string
- teams – array of
github.Team.Team
Return type: None
- user –
-
cancel_invitation
(invitee)¶ Calls: DELETE /orgs/{org}/invitations/{invitation_id} Parameters: invitee – github.NamedUser.NamedUser
Return type: None
-
has_in_members
(member)¶ Calls: GET /orgs/{org}/members/{user} Parameters: member – github.NamedUser.NamedUser
Return type: bool
-
has_in_public_members
(public_member)¶ Calls: GET /orgs/{org}/public_members/{user} Parameters: public_member – github.NamedUser.NamedUser
Return type: bool
-
remove_from_membership
(member)¶ Calls: DELETE /orgs/{org}/memberships/{user} Parameters: member – github.NamedUser.NamedUser
Return type: None
-
remove_from_members
(member)¶ Calls: DELETE /orgs/{org}/members/{user} Parameters: member – github.NamedUser.NamedUser
Return type: None
-
remove_from_public_members
(public_member)¶ Calls: DELETE /orgs/{org}/public_members/{user} Parameters: public_member – github.NamedUser.NamedUser
Return type: None
-
create_migration
(repos, lock_repositories=NotSet, exclude_attachments=NotSet)¶ Calls: Parameters: - repos – list or tuple of str
- lock_repositories – bool
- exclude_attachments – bool
Return type:
-
get_migrations
()¶ Calls: GET /orgs/{org}/migrations Return type: github.PaginatedList.PaginatedList
ofgithub.Migration.Migration
-
get_installations
()¶ Calls: GET /orgs/{org}/installations Return type: github.PaginatedList.PaginatedList
ofgithub.Installation.Installation
-