airflow.providers.github.sensors.github

Classes

GithubSensor

Base GithubSensor which can monitor for any change.

BaseGithubRepositorySensor

Base GitHub sensor at Repository level.

GithubTagSensor

Monitor a github tag for its creation.

Module Contents

class airflow.providers.github.sensors.github.GithubSensor(*, method_name, github_conn_id='github_default', method_params=None, result_processor=None, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Base GithubSensor which can monitor for any change.

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

  • method_name (str) – method name from PyGithub to be executed

  • method_params (dict | None) – parameters for the method method_name

  • result_processor (Callable | None) – function that return boolean and act as a sensor response

github_conn_id = 'github_default'[source]
result_processor = None[source]
method_name[source]
method_params = None[source]
poke(context)[source]

Override when deriving this class.

class airflow.providers.github.sensors.github.BaseGithubRepositorySensor(*, github_conn_id='github_default', repository_name=None, result_processor=None, **kwargs)[source]

Bases: GithubSensor

Base GitHub sensor at Repository level.

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

  • repository_name (str | None) – full qualified name of the repository to be monitored, ex. “apache/airflow”

poke(context)[source]

Check sensor status; sensors defined while deriving this class should override.

class airflow.providers.github.sensors.github.GithubTagSensor(*, github_conn_id='github_default', tag_name=None, repository_name=None, **kwargs)[source]

Bases: BaseGithubRepositorySensor

Monitor a github tag for its creation.

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

  • tag_name (str | None) – name of the tag to be monitored

  • repository_name (str | None) – fully qualified name of the repository to be monitored, ex. “apache/airflow”

template_fields = ('tag_name',)[source]
repository_name = None[source]
tag_name = None[source]
poke(context)[source]

Check sensor status; sensors defined while deriving this class should override.

tag_checker(repo)[source]

Check existence of Tag in a Repository.

Was this entry helpful?