GitHub
App · Code Repositories · 17 actions · 7 triggers
Manage GitHub branches, issues, and pull requests with a personal access token.
Triggers
Start a workflow when something happens in GitHub. See how triggers work.
New pull request
Runs when a pull request is opened in a GitHub repository.
Filters
Narrow which events start a run.
ownerRequiredrepoRequiredbase
Event fields
What a run starts with. Later steps read each field with an @ reference.
numbernumbertitletextstatetexthtml_urltextheadtextbasetextdrafttrue/falseusertextcreated_attextupdated_attext
Updated pull request
Runs when a pull request in a GitHub repository is updated.
Filters
Narrow which events start a run.
ownerRequiredrepoRequiredbase
Event fields
What a run starts with. Later steps read each field with an @ reference.
numbernumbertitletextstatetexthtml_urltextheadtextbasetextdrafttrue/falseusertextcreated_attextupdated_attext
New issue
Runs when an issue is opened in a GitHub repository.
Filters
Narrow which events start a run.
ownerRequiredrepoRequiredlabel
Event fields
What a run starts with. Later steps read each field with an @ reference.
numbernumbertitletextstatetexthtml_urltextbodytextusertextlabelslistassigneeslistcreated_attextupdated_attext
Updated issue
Runs when an issue in a GitHub repository is updated.
Filters
Narrow which events start a run.
ownerRequiredrepoRequiredlabel
Event fields
What a run starts with. Later steps read each field with an @ reference.
numbernumbertitletextstatetexthtml_urltextbodytextusertextlabelslistassigneeslistcreated_attextupdated_attext
New push to branch
Runs for each new commit pushed to a branch of a GitHub repository.
Filters
Narrow which events start a run.
ownerRequiredrepoRequiredbranch
Event fields
What a run starts with. Later steps read each field with an @ reference.
shatextmessagetextauthortextbranchtexthtml_urltextcommitted_attext
New release
Runs when a release is created in a GitHub repository.
Filters
Narrow which events start a run.
ownerRequiredrepoRequired
Event fields
What a run starts with. Later steps read each field with an @ reference.
idnumbertag_nametextnametextbodytextdrafttrue/falseprereleasetrue/falsehtml_urltextauthortextpublished_attext
New review request
Runs when someone is asked to review a pull request in a GitHub repository.
Filters
Narrow which events start a run.
ownerRequiredrepoRequiredreviewer
Event fields
What a run starts with. Later steps read each field with an @ reference.
numbernumbertitletextstatetexthtml_urltextheadtextbasetextdrafttrue/falseusertextcreated_attextupdated_attextreviewertext
Actions
| Action | What it does |
|---|---|
| Add label to issue | Add one or more labels to an issue, keeping the labels it already has. |
| Close pull request | Close a pull request without merging it. |
| Create branch | Create a new branch in a repository. |
| Create comment | Add a comment to an issue or pull request. |
| Create issue | Create a new issue in a repository. |
| Create pull request | Open a new pull request to merge one branch into another. |
| Delete branch | Delete a branch from a repository. |
| Delete issue | Permanently delete an issue. |
| Get branch | Get details of a specific branch, including its latest commit SHA. |
| Get issue | Get details of a specific issue. |
| Get organization | Get the public profile details of a GitHub organization. |
| Get pull request | Get details of a specific pull request. |
| Get user | Get the public profile details of a GitHub user. |
| Lock issue | Lock an issue's conversation so only repository collaborators can comment on it. |
| Remove label from issue | Remove one label from an issue, leaving its other labels alone. |
| Unlock issue | Unlock an issue's conversation so anyone can comment again. |
| Update issue | Update an existing issue. |
Add label to issue
Add one or more labels to an issue, keeping the labels it already has.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Issue
issue_numbernumberRequired - The open issue to act on.
- Labels
labelstextRequired - The labels to add. Pick one, or enter several separated by commas.
Outputs
addedlistissue_numbernumberlabelslist
Example output
{
"added": [
"bug"
],
"issue_number": 42,
"labels": [
"bug",
"needs-triage"
]
}Close pull request
Close a pull request without merging it. GitHub does not allow pull requests to be deleted, so closing is the way to shut one down.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Pull request
pull_numbernumberRequired - The open pull request to act on.
Outputs
html_urltextidnumbernumbernumberstatetexttitletext
Example output
{
"base": "main",
"draft": false,
"head": "feature/new-widget",
"html_url": "https://github.com/octocat/hello-world/pull/7",
"id": 111,
"merged": false,
"number": 7,
"state": "closed",
"title": "Add new widget"
}Create branch
Create a new branch in a repository. Points the new branch at the tip of an existing branch (defaults to the repository's default branch) unless you supply a specific commit SHA.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- New branch name
branchtextRequired - The name for the new branch (without the 'refs/heads/' prefix).
- Source branch
from_branchtext - The existing branch to base the new one on. Defaults to the repository's default branch when not set.
- Source commit SHA
shatext - A specific commit SHA to point the new branch at. Takes precedence over the source branch when provided.
Outputs
nametextreftextshatext
Example output
{
"name": "feature/new-widget",
"ref": "refs/heads/feature/new-widget",
"sha": "aa218f56b14c9653891f9e74264a383fa43fefbd"
}Create comment
Add a comment to an issue or pull request. Use the issue or pull request number, since both share the same numbering.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Issue
issue_numbernumberRequired - The open issue to comment on. To comment on a pull request, reference its number from an earlier step.
- Comment
bodytextRequired - The text of the comment.
Outputs
bodytexthtml_urltextidnumberuserobject
Example output
{
"body": "This is a comment.",
"html_url": "https://github.com/octocat/hello-world/issues/42#issuecomment-456",
"id": 456,
"user": {
"login": "commenter"
}
}Create issue
Create a new issue in a repository.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Title
titletextRequired - The title of the new issue.
- Description
bodytext - The main text of the issue.
- Labels
labelslist - Labels to add to the issue.
- Assignees
assigneeslist - The people to assign to the issue.
Outputs
html_urltextidnumbernumbernumberstatetexttitletext
Example output
{
"html_url": "https://github.com/octocat/hello-world/issues/43",
"id": 123,
"number": 43,
"state": "open",
"title": "New Feature Request"
}Create pull request
Open a new pull request to merge one branch into another.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Title
titletextRequired - The title of the pull request.
- Source branch (head)
headtextRequired - The branch with your changes that you want to merge in. For a cross-fork request, reference a 'username:branch' value from an earlier step.
- Target branch (base)
basetextRequired - The branch you want your changes merged into.
- Description
bodytext - The main text describing the pull request.
- Create as draft
drafttrue/false - Open the pull request as a draft that isn't ready to merge.Default:
false.
Outputs
basetextdrafttrue/falseheadtexthtml_urltextidnumbermergedtrue/falsenumbernumberstatetexttitletext
Example output
{
"base": "main",
"draft": false,
"head": "feature/new-widget",
"html_url": "https://github.com/octocat/hello-world/pull/7",
"id": 111,
"merged": false,
"number": 7,
"state": "open",
"title": "Add new widget"
}Delete branch
Delete a branch from a repository.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Branch name
branchtextRequired - The name of the branch to delete (without the 'refs/heads/' prefix).
Outputs
branchtextdeletedtrue/false
Example output
{
"branch": "feature/old-widget",
"deleted": true
}Delete issue
Permanently delete an issue. GitHub only allows this through its GraphQL API, and the connected account must be able to delete issues in the repository (an organization owner, or a repository admin or maintainer).
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Issue
issue_numbernumberRequired - The open issue to delete.
Outputs
deletedtrue/falseissue_numbernumber
Example output
{
"deleted": true,
"issue_number": 42
}Get branch
Get details of a specific branch, including its latest commit SHA.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Branch name
branchtextRequired - The name of the branch to look up.
Outputs
html_urltextnametextprotectedtrue/falseshatext
Example output
{
"html_url": "https://github.com/octocat/hello-world/tree/main",
"name": "main",
"protected": true,
"sha": "aa218f56b14c9653891f9e74264a383fa43fefbd"
}Get issue
Get details of a specific issue.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Issue
issue_numbernumberRequired - The open issue to look up.
Outputs
bodytexthtml_urltextidnumbernumbernumberstatetexttitletext
Example output
{
"body": "Description of the bug.",
"html_url": "https://github.com/octocat/hello-world/issues/42",
"id": 789,
"number": 42,
"state": "open",
"title": "Bug in feature X"
}Get organization
Get the public profile details of a GitHub organization.
Inputs
- Organization
orgtextRequired - The login (short name) of the organization.
Outputs
descriptiontexthtml_urltextidnumberlogintextnametextpublic_reposnumber
Example output
{
"description": "How people build software.",
"html_url": "https://github.com/github",
"id": 9919,
"login": "github",
"name": "GitHub",
"public_repos": 484
}Get pull request
Get details of a specific pull request.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Pull request
pull_numbernumberRequired - The open pull request to act on.
Outputs
basetextbodytextdrafttrue/falseheadtexthtml_urltextidnumbermergedtrue/falsenumbernumberstatetexttitletext
Example output
{
"base": "main",
"body": "This pull request adds the new widget.",
"draft": false,
"head": "feature/new-widget",
"html_url": "https://github.com/octocat/hello-world/pull/7",
"id": 111,
"merged": false,
"number": 7,
"state": "open",
"title": "Add new widget"
}Get user
Get the public profile details of a GitHub user. Leave the username blank to fetch the account the token belongs to.
Inputs
- Username
usernametext - The GitHub username to look up. Leave blank for the connected (authenticated) account.
Outputs
html_urltextidnumberlogintextnametextpublic_reposnumbertypetext
Example output
{
"html_url": "https://github.com/octocat",
"id": 583231,
"login": "octocat",
"name": "The Octocat",
"public_repos": 8,
"type": "User"
}Lock issue
Lock an issue's conversation so only repository collaborators can comment on it.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Issue
issue_numbernumberRequired - The open issue to act on.
- Reason
lock_reasontext - Why the conversation is being locked. Optional.One of:
off-topic(Off topic),too heated,resolved,spam.
Outputs
issue_numbernumberlock_reasontextlockedtrue/false
Example output
{
"issue_number": 42,
"lock_reason": "resolved",
"locked": true
}Remove label from issue
Remove one label from an issue, leaving its other labels alone.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Issue
issue_numbernumberRequired - The open issue to act on.
- Label
labeltextRequired - The label to remove from the issue.
Outputs
issue_numbernumberlabelslistremovedtext
Example output
{
"issue_number": 42,
"labels": [
"bug"
],
"removed": "needs-triage"
}Unlock issue
Unlock an issue's conversation so anyone can comment again.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Issue
issue_numbernumberRequired - The open issue to act on.
Outputs
issue_numbernumberlockedtrue/false
Example output
{
"issue_number": 42,
"locked": false
}Update issue
Update an existing issue. Only the fields you fill in are changed. Labels and assignees replace the issue's current lists; use 'Add label to issue' / 'Remove label from issue' to change one label at a time.
Inputs
- Repository owner
ownertextRequired - The username or organization that owns the repository (the part before the '/' in 'owner/repo').
- Repository name
repotextRequired - The name of the repository (the part after the '/' in 'owner/repo').
- Issue
issue_numbernumberRequired - The open issue to act on.
- Title
titletext - A new title for the issue. Leave blank to keep the current one.
- Description
bodytext - A new description for the issue. Leave blank to keep the current one.
- State
statetext - Reopen or close the issue. Leave blank to keep its current state.One of:
open,closed. - Labels
labelslist - The complete set of labels the issue should end up with. Leave blank to keep its current labels.
- Assignees
assigneeslist - The complete set of assignees the issue should end up with. Leave blank to keep its current assignees.
Outputs
assigneeslistbodytexthtml_urltextidnumberlabelslistlockedtrue/falsenumbernumberstatetexttitletext
Example output
{
"assignees": [
"octocat"
],
"body": "The widget stops responding after a resize.",
"html_url": "https://github.com/octocat/hello-world/issues/42",
"id": 1001,
"labels": [
"bug"
],
"locked": false,
"number": 42,
"state": "open",
"title": "Fix the widget"
}