Skip to main content

prefect_github.organization

This is a module containing: GitHub query_organization* tasks

Functions

query_organization

The query root of GitHub’s GraphQL interface. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_team

Find an organization’s team by its slug. Args:
  • login: The organization’s login.
  • slug: The name or slug of the team to find.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_teams

A list of teams in this organization. Args:
  • login: The organization’s login.
  • user_logins: User logins to filter by.
  • github_credentials: Credentials to use for authentication with GitHub.
  • privacy: If non-null, filters teams according to privacy.
  • role: If non-null, filters teams according to whether the viewer is an admin or member on team.
  • query: If non-null, filters teams with query on team name and team slug.
  • order_by: Ordering options for teams returned from the connection.
  • ldap_mapped: If true, filters teams that are mapped to an LDAP Group (Enterprise only).
  • root_teams_only: If true, restrict to only root teams.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_project

Find project by number. Args:
  • login: The organization’s login.
  • number: The project number to find.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_domains

A list of domains owned by the organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • is_verified: Filter by if the domain is verified.
  • is_approved: Filter by if the domain is approved.
  • order_by: Ordering options for verifiable domains returned.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_packages

A list of packages under the owner. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • names: Find packages by their names.
  • repository_id: Find packages in a repository by ID.
  • package_type: Filter registry package by type.
  • order_by: Ordering of the returned packages.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_projects

A list of projects under the owner. Args:
  • login: The organization’s login.
  • states: A list of states to filter the projects by.
  • github_credentials: Credentials to use for authentication with GitHub.
  • order_by: Ordering options for projects returned from the connection.
  • search: Query to search projects by, currently only searching by name.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsors

List of sponsors for this user or organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • tier_id: If given, will filter for sponsors at the given tier. Will only return sponsors whose tier the viewer is permitted to see.
  • order_by: Ordering options for sponsors returned from the connection.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_audit_log

Audit log entries of the organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • query: The query string to filter audit entries.
  • order_by: Ordering options for the returned audit log entries.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_project_v2

Find a project by number. Args:
  • login: The organization’s login.
  • number: The project number.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_projects_v2

A list of projects under the owner. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • query: A project to search for under the the owner.
  • order_by: How to order the returned projects.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_repository

Find Repository. Args:
  • login: The organization’s login.
  • name: Name of Repository to find.
  • github_credentials: Credentials to use for authentication with GitHub.
  • follow_renames: Follow repository renames. If disabled, a repository referenced by its old name will return an error.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsoring

List of users and organizations this entity is sponsoring. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • order_by: Ordering options for the users and organizations returned from the connection.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_project_next

Find a project by project (beta) number. Args:
  • login: The organization’s login.
  • number: The project (beta) number.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_pinned_items

A list of repositories and gists this profile owner has pinned to their profile. Args:
  • login: The organization’s login.
  • types: Filter the types of pinned items that are returned.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_projects_next

A list of projects (beta) under the owner. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • query: A project (beta) to search for under the the owner.
  • sort_by: How to order the returned projects (beta).
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_repositories

A list of repositories that the user owns. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • privacy: If non-null, filters repositories according to privacy.
  • order_by: Ordering options for repositories returned from the connection.
  • affiliations: Array of viewer’s affiliation options for repositories returned from the connection. For example, OWNER will include only repositories that the current viewer owns.
  • owner_affiliations: Array of owner’s affiliation options for repositories returned from the connection. For example, OWNER will include only repositories that the organization or user being viewed owns.
  • is_locked: If non-null, filters repositories according to whether they have been locked.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • is_fork: If non-null, filters repositories according to whether they are forks of another repository.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_item_showcase

Showcases a selection of repositories and gists that the profile owner has either curated or that have been selected automatically based on popularity. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_pinnable_items

A list of repositories and gists this profile owner can pin to their profile. Args:
  • login: The organization’s login.
  • types: Filter the types of pinnable items that are returned.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_recent_projects

Recent projects that this user has modified in the context of the owner. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_member_statuses

Get the status messages members of this entity have set that are either public or visible only to the organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • order_by: Ordering options for user statuses returned from the connection.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_pending_members

A list of users who have been invited to join this organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsors_listing

The GitHub Sponsors listing for this user or organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_members_with_role

A list of users who are members of this organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_enterprise_owners

A list of owners of the organization’s enterprise account. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • query: The search string to look for.
  • organization_role: The organization role to filter by.
  • order_by: Ordering options for enterprise owners returned from the connection.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsors_activities

Events involving this sponsorable, such as new sponsorships. Args:
  • login: The organization’s login.
  • actions: Filter activities to only the specified actions.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • period: Filter activities returned to only those that occurred in the most recent specified time period. Set to ALL to avoid filtering by when the activity occurred.
  • order_by: Ordering options for activity returned from the connection.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_interaction_ability

The interaction ability settings for this organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_ip_allow_list_entries

The IP addresses that are allowed to access resources owned by the organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • order_by: Ordering options for IP allow list entries returned.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_repository_migrations

A list of all repository migrations for this organization. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • state: Filter repository migrations by state.
  • repository_name: Filter repository migrations by repository name.
  • order_by: Ordering options for repository migrations returned.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_saml_identity_provider

The Organization’s SAML identity providers. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_repository_discussions

Discussions this user has started. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • order_by: Ordering options for discussions returned from the connection.
  • repository_id: Filter discussions to only those in a specific repository.
  • answered: Filter discussions to only those that have been answered or not. Defaults to including both answered and unanswered discussions.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsorships_as_sponsor

This object’s sponsorships as the sponsor. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • order_by: Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsorship_newsletters

List of sponsorship updates sent from this sponsorable to sponsors. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • order_by: Ordering options for sponsorship updates returned from the connection.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsorships_as_maintainer

This object’s sponsorships as the maintainer. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • include_private: Whether or not to include private sponsorships in the result set.
  • order_by: Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_repository_discussion_comments

Discussion comments this user has authored. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • after: Returns the elements in the list that come after the specified cursor.
  • before: Returns the elements in the list that come before the specified cursor.
  • first: Returns the first n elements from the list.
  • last: Returns the last n elements from the list.
  • repository_id: Filter discussion comments to only those in a specific repository.
  • only_answers: Filter discussion comments to only those that were marked as the answer.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsorship_for_viewer_as_sponsor

The sponsorship from the viewer to this user/organization; that is, the sponsorship where you’re the sponsor. Only returns a sponsorship if it is active. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.

query_organization_sponsorship_for_viewer_as_sponsorable

The sponsorship from this user/organization to the viewer; that is, the sponsorship you’re receiving. Only returns a sponsorship if it is active. Args:
  • login: The organization’s login.
  • github_credentials: Credentials to use for authentication with GitHub.
  • return_fields: Subset the return fields (as snake_case); defaults to fields listed in configs/query/*.json.
Returns:
  • A dict of the returned fields.