Dagster + Github
Integrate with GitHub Apps and automate operations within your github repositories.
About this integration
This library provides an integration with GitHub Apps by providing a thin wrapper on the github v4 graphql API. This allows for automating operations within your github repositories and with the tighter permissions scopes that github apps allow for vs using a personal token.
Installation
pip install dagster-github
Example
import os
from dagster import EnvVar, job, op
from dagster_github import GithubResource
github = GithubResource(
github_app_id=EnvVar("GITHUB_APP_ID"),
github_app_private_rsa_key=EnvVar("GITHUB_PRIVATE_KEY"),
github_installation_id=EnvVar("GITHUB_INSTALLATION_ID"),
)
@op
def github_op(github: GithubResource):
github.get_client().create_issue(
repo_name="dagster",
repo_owner="dagster-io",
title="Dagster's first github issue",
body="this open source thing seems like a pretty good idea",
)
@job(resource_defs={"github": github})
def github_job():
github_op()
About Github
Github provides a highly available git repo, access control, bug tracking, software feature requests, task management, continuous integration, and wikis for open source and commercial projects.