airflow.providers.github.operators.github

Module Contents

Classes

GithubOperator

Interact and perform actions on GitHub API.

class airflow.providers.github.operators.github.GithubOperator(*, github_method, github_conn_id='github_default', github_method_args=None, result_processor=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Interact and perform actions on GitHub API.

This operator is designed to use GitHub’s Python SDK: https://github.com/PyGithub/PyGithub

See also

For more information on how to use this operator, take a look at the guide: Operators

Parameters
  • github_conn_id (str) – Reference to a pre-defined GitHub Connection

  • github_method (str) – Method name from GitHub Python SDK to be called

  • github_method_args (dict | None) – Method parameters for the github_method. (templated)

  • result_processor (Callable | None) – Function to further process the response from GitHub API

template_fields = ('github_method_args',)[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?