airflow.providers.github.sensors.github

Module Contents

Classes

GithubSensor

Base GithubSensor which can monitor for any change.

BaseGithubRepositorySensor

Base GitHub sensor at Repository level.

GithubTagSensor

Monitors a github tag for its creation.

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 (Optional[dict]) -- parameters for the method method_name

  • result_processor (Optional[Callable]) -- function that return boolean and act as a sensor response

poke(self, context)[source]

Function that the sensors defined while deriving this class should override.

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 (Optional[str]) -- full qualified name of the repository to be monitored, ex. "apache/airflow"

poke(self, context)[source]

Function that the 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

Monitors a github tag for its creation.

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

  • tag_name (Optional[str]) -- name of the tag to be monitored

  • repository_name (Optional[str]) -- fully qualified name of the repository to be monitored, ex. "apache/airflow"

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

Function that the sensors defined while deriving this class should override.

tag_checker(self, repo)[source]

Checking existence of Tag in a Repository

Was this entry helpful?