# GitHub Tasks
A collection of tasks for interacting with GitHub.
# CreateGitHubPR
class
prefect.tasks.github.prs.CreateGitHubPR
(repo=None, title=None, body=None, head=None, base=None, **kwargs)[source]Task for opening/creating new GitHub Pull Requests using the v3 version of the GitHub REST API.
Args:
repo (str, optional)
: the name of the repository to open the issue in; must be provided in the formorganization/repo_name
; can also be provided to therun
methodtitle (str, optional)
: the title of the issue to create; can also be provided to therun
methodbody (str, optional)
: the contents of the issue; can also be provided to therun
methodhead (str, optional)
: the name of the branch where your changes are implemented; can also be provided to therun
methodbase (str, optional)
: the name of the branch you want the changes pulled into; can also be provided to therun
method**kwargs (Any, optional)
: additional keyword arguments to pass to the standard Task init method
methods: |
---|
prefect.tasks.github.prs.CreateGitHubPR.run (repo=None, title=None, body=None, head=None, base=None, token=None)[source] |
Run method for this Task. Invoked by calling this Task after initialization within a Flow context, or by using
|
# OpenGitHubIssue
class
prefect.tasks.github.issues.OpenGitHubIssue
(repo=None, title=None, body=None, labels=None, **kwargs)[source]Task for opening / creating new GitHub issues using the v3 version of the GitHub REST API.
Args:
repo (str, optional)
: the name of the repository to open the issue in; must be provided in the formorganization/repo_name
; can also be provided to therun
methodtitle (str, optional)
: the title of the issue to create; can also be provided to therun
methodbody (str, optional)
: the contents of the issue; can also be provided to therun
methodlabels (List[str], optional)
: a list of labels to apply to the newly opened issues; can also be provided to therun
method**kwargs (Any, optional)
: additional keyword arguments to pass to the standard Task init method
methods: |
---|
prefect.tasks.github.issues.OpenGitHubIssue.run (repo=None, title=None, body=None, labels=None, token=None)[source] |
Run method for this Task. Invoked by calling this Task after initialization within a Flow context, or by using
|
# CreateIssueComment
class
prefect.tasks.github.comments.CreateIssueComment
(repo=None, issue_number=None, body=None, **kwargs)[source]Task for creating a comment on the specified GitHub issue using the v3 version of the GitHub REST API.
Args:
repo (str, optional)
: the name of the repository to create the comment in; must be provided in the formorganization/repo_name
; can also be provided to therun
methodissue_number (int, optional)
: the ID of the issue to create the comment on.body (str, optional)
: the body of the comment; can also be provided to therun
method**kwargs (Any, optional)
: additional keyword arguments to pass to the standard Task init method
methods: |
---|
prefect.tasks.github.comments.CreateIssueComment.run (repo=None, issue_number=None, body=None, token=None)[source] |
Run method for this Task. Invoked by calling this Task after initialization within a Flow context, or by using
|
# GetRepoInfo
Task for retrieving GitHub repository information using the v3 version of the GitHub REST API.
Args:
repo (str, optional)
: the name of the repository to open the issue in; must be provided in the formorganization/repo_name
oruser/repo_name
; can also be provided to therun
methodinfo_keys (List[str], optional)
: a list of repo attributes to pull (e.g.,["stargazers_count", "subscribers_count"]
). A full list of available keys can be found in the official GitHub documentation**kwargs (Any, optional)
: additional keyword arguments to pass to the standard Task init method
methods: |
---|
prefect.tasks.github.repos.GetRepoInfo.run (repo=None, info_keys=None, token=None)[source] |
Run method for this Task. Invoked by calling this Task after initialization within a Flow context, or by using
|
# CreateBranch
class
prefect.tasks.github.repos.CreateBranch
(repo=None, base="master", branch_name=None, **kwargs)[source]Task for creating new branches using the v3 version of the GitHub REST API.
Args:
repo (str, optional)
: the name of the repository to create the branch in; must be provided in the formorganization/repo_name
oruser/repo_name
; can also be provided to therun
methodbase (str, optional)
: the name of the branch you want to branch off; can also be provided to therun
method. Defaults to "master".branch_name (str, optional)
: the name of the new branch; can also be provided to therun
method**kwargs (Any, optional)
: additional keyword arguments to pass to the standard Task init method
methods: |
---|
prefect.tasks.github.repos.CreateBranch.run (repo=None, base=None, branch_name=None, token=None)[source] |
Run method for this Task. Invoked by calling this Task after initialization within a Flow context, or by using
|
This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC