Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding GitHub provider #21076

Merged
merged 22 commits into from
Jan 28, 2022
Merged

Adding GitHub provider #21076

merged 22 commits into from
Jan 28, 2022

Conversation

pateash
Copy link
Contributor

@pateash pateash commented Jan 24, 2022

closes: #20300


Description

Adding Github provider based on Python SDK https://github.com/PyGithub/PyGithub
The SDK has many objects which can be viewed at https://pygithub.readthedocs.io/en/latest/github_objects.html

Users can create their own custom operators leveraging the PyGithub SDK, either by leveraging Hook directly or building their operator on GithubOperator by providing method and method_args from PyGithub
results can be further processed by implementing result_processor method, please look into GithubTagSensor for reference.

github_operator = GithubOperator(
    task_id='github-test',
    github_method="get_repo",
    github_method_args={'full_name_or_id': 'apache/airflow'},
    result_processor=lambda r: r.full_name,
    dag=self.dag,
)

@pateash pateash changed the title 20300 add GitHub provider [WIP]: 20300 add GitHub provider Jan 24, 2022
@pateash pateash changed the title [WIP]: 20300 add GitHub provider [WIP]: 20300- Adding GitHub provider Jan 24, 2022
@potiuk potiuk changed the title [WIP]: 20300- Adding GitHub provider [WIP]: Adding GitHub provider Jan 25, 2022
@potiuk potiuk changed the title [WIP]: Adding GitHub provider [WIP]: Add GitHub provider Jan 25, 2022
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice one!

I left a few comments, but it looks great already!

@pateash pateash requested a review from potiuk January 26, 2022 15:44
@pateash pateash changed the title [WIP]: Add GitHub provider Adding GitHub provider Jan 26, 2022
@pateash
Copy link
Contributor Author

pateash commented Jan 26, 2022

image

image

@pateash
Copy link
Contributor Author

pateash commented Jan 26, 2022

image

@pateash pateash force-pushed the 20300-Add-Github-provider branch from 3fcacda to 58e3f99 Compare January 26, 2022 15:49
@pateash
Copy link
Contributor Author

pateash commented Jan 26, 2022

Hi @potiuk,
thanks for the comments, Please let me know if anything else needed.

@pateash pateash changed the title Adding GitHub provider WIP: Adding GitHub provider Jan 26, 2022
@pateash pateash requested a review from eladkal January 26, 2022 16:55
@pateash pateash force-pushed the 20300-Add-Github-provider branch from 94c689a to 8369d9f Compare January 28, 2022 12:24
Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk any further comments?

@potiuk potiuk merged commit 5d23fbe into apache:main Jan 28, 2022
@potiuk
Copy link
Member

potiuk commented Jan 28, 2022

Just in time for the January wave of Providers :)

@pateash pateash deleted the 20300-Add-Github-provider branch February 15, 2022 13:49
@jedcunningham jedcunningham added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) kind:documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Github provider
4 participants