Organization

class github.Organization.Organization

This class represents Organizations. The reference can be found here http://developer.github.com/v3/orgs/

avatar_url
Type:string
billing_email
Type:string
blog
Type:string
collaborators
Type:integer
company
Type:string
created_at
Type:datetime.datetime
description
Type:string
disk_usage
Type:integer
email
Type:string
events_url
Type:string
followers
Type:integer
following
Type:integer
gravatar_id
Type:string
html_url
Type:string
id
Type:integer
location
Type:string
login
Type:string
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:

PUT /orgs/:org/memberships/:user

Parameters:
Return type:

None

add_to_public_members(public_member)
Calls:PUT /orgs/:org/public_members/:user
Parameters:public_membergithub.NamedUser.NamedUser
Return type:None
create_fork(repo)
Calls:POST /repos/:owner/:repo/forks
Parameters:repogithub.Repository.Repository
Return type:github.Repository.Repository
create_hook(name, config, events=NotSet, active=NotSet)
Calls:

POST /orgs/:owner/hooks

Parameters:
  • name – string
  • config – dict
  • events – list of string
  • active – bool
Return type:

github.Hook.Hook

create_repo(name, description=NotSet, homepage=NotSet, private=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)
Calls:

POST /orgs/:org/repos

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
Return type:

github.Repository.Repository

create_team(name, repo_names=NotSet, permission=NotSet, privacy=NotSet, description=NotSet)
Calls:

POST /orgs/:org/teams

Parameters:
Return type:

github.Team.Team

delete_hook(id)
Calls:DELETE /orgs/:owner/hooks/:id
Parameters:id – integer
Return type:None`
edit(billing_email=NotSet, blog=NotSet, company=NotSet, description=NotSet, email=NotSet, location=NotSet, name=NotSet)
Calls:

PATCH /orgs/:org

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:

PATCH /orgs/:owner/hooks/:id

Parameters:
  • id – integer
  • name – string
  • config – dict
  • events – list of string
  • active – bool
Return type:

github.Hook.Hook

get_events()
Calls:GET /orgs/:org/events
Return type:github.PaginatedList.PaginatedList of github.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 of github.Hook.Hook
get_issues(filter=NotSet, state=NotSet, labels=NotSet, sort=NotSet, direction=NotSet, since=NotSet)
Calls:

GET /orgs/:org/issues

Return type:

github.PaginatedList.PaginatedList of github.Issue.Issue

Parameters:
  • filter – string
  • state – string
  • labels – list of github.Label.Label
  • sort – string
  • direction – string
  • since – datetime.datetime
Return type:

github.PaginatedList.PaginatedList of github.Issue.Issue

get_members(filter_=NotSet, role=NotSet)
Calls:

GET /orgs/:org/members

Parameters:
  • filter – string
  • role – string
Return type:

github.PaginatedList.PaginatedList of github.NamedUser.NamedUser

get_projects(state=NotSet)
Calls:GET /orgs/:org/projects
Return type:github.PaginatedList.PaginatedList of github.Project.Project
Parameters:state – string
get_public_members()
Calls:GET /orgs/:org/public_members
Return type:github.PaginatedList.PaginatedList of github.NamedUser.NamedUser
get_outside_collaborators(filter_=NotSet)
Calls:GET /orgs/:org/outside_collaborators
Parameters:filter – string
Return type:github.PaginatedList.PaginatedList of github.NamedUser.NamedUser
remove_outside_collaborator(collaborator)
Calls:DELETE /orgs/:org/outside_collaborators/:username
Parameters:collaboratorgithub.NamedUser.NamedUser
Return type:None
convert_to_outside_collaborator(member)
Calls:PUT /orgs/:org/outside_collaborators/:username
Parameters:membergithub.NamedUser.NamedUser
Return type:None
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:

GET /orgs/:org/repos

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 of github.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 of github.Team.Team
invitations()
Calls:GET /orgs/:org/invitations
Return type:github.PaginatedList.PaginatedList of github.NamedUser.NamedUser
invite_user(user=NotSet, email=NotSet, role=NotSet, teams=NotSet)
Calls:

POST /orgs/:org/invitations

Parameters:
Return type:

None

has_in_members(member)
Calls:GET /orgs/:org/members/:user
Parameters:membergithub.NamedUser.NamedUser
Return type:bool
has_in_public_members(public_member)
Calls:GET /orgs/:org/public_members/:user
Parameters:public_membergithub.NamedUser.NamedUser
Return type:bool
remove_from_membership(member)
Calls:DELETE /orgs/:org/memberships/:user
Parameters:membergithub.NamedUser.NamedUser
Return type:None
remove_from_members(member)
Calls:DELETE /orgs/:org/members/:user
Parameters:membergithub.NamedUser.NamedUser
Return type:None
remove_from_public_members(public_member)
Calls:DELETE /orgs/:org/public_members/:user
Parameters:public_membergithub.NamedUser.NamedUser
Return type:None
create_migration(repos, lock_repositories=NotSet, exclude_attachments=NotSet)
Calls:

`POST /orgs/:org/migrations`_

Parameters:
  • repos – list or tuple of str
  • lock_repositories – bool
  • exclude_attachments – bool
Return type:

github.Migration.Migration

get_migrations()
Calls:`GET /orgs/:org/migrations`_
Return type:github.PaginatedList.PaginatedList of github.Migration.Migration