Skip to main content

Dagster & GitHub

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

from dagster_github import GithubResource

import dagster as dg


@dg.asset
def github_asset(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",
)


defs = dg.Definitions(
assets=[github_asset],
resources={
"github": GithubResource(
github_app_id=dg.EnvVar.int("GITHUB_APP_ID"),
github_app_private_rsa_key=dg.EnvVar("GITHUB_PRIVATE_KEY"),
github_installation_id=dg.EnvVar.int("GITHUB_INSTALLATION_ID"),
)
},
)

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.