Skip to main content

GitHub action

Runs one operation against a GitHub repository. In the action picker it is GitHub, under Integration Actions. One action, 22 operations: pick the connection and repository, choose the operation, and the form asks for what that operation needs.

Fields

FieldRequiredDescription
ConnectionYesThe GitHub connection to use.
RepositoryYesThe repository to act on, as organization/repository.
OperationYesWhat to do. Choosing one reveals its own inputs.

Most text inputs on an operation accept variables, so an operation can work on the trigger's data and earlier results.

Pull request operations

OperationWhat it takes
Create Pull RequestA title, the head and base branches, an optional body, and whether it opens as a draft or lets maintainers push to it.
Get Pull RequestA pull request number.
Update Pull RequestA pull request number, plus the title, body, base branch, or state to change.
Merge Pull RequestA pull request number, an optional commit message, the merge method, and an optional expected head commit so the merge is refused if the branch moved.
Submit Pull Request ReviewA pull request number, the review to submit—approve, request changes, or comment—and an optional body.
Add ReviewersA pull request number and the reviewers to request.

Issue operations

OperationWhat it takes
Create IssueA title, an optional body, assignees, and labels.
Get IssueAn issue number.
Update IssueAn issue number, plus the title, body, or state to change.

Operations on both

OperationWhat it takes
Add CommentAn issue or pull request number and the comment body.
Modify AssigneesAn issue or pull request number, whether to add, remove, or replace, and the assignees.
Modify LabelsAn issue or pull request number, whether to add, remove, or replace, and the labels.

Branch operations

OperationWhat it takes
Create BranchThe branch name and the commit to branch from.
Get BranchA branch name.
List BranchesNothing beyond the repository.
Delete BranchA branch name.

File and commit operations

OperationWhat it takes
Get File ContentsA path, and optionally the branch, tag, or commit to read it at.
Create Or Update FileA path, the contents, a commit message, a branch, and—when replacing an existing file—the commit it is being replaced from.
Create CommitA branch, a commit message, and a list of file changes.
Create Commit StatusA commit, the state to report, and an optional description, target URL, and context.

Release and workflow operations

OperationWhat it takes
Create ReleaseA tag, an optional name and body, the commit to target, and whether it is a draft or a prerelease.
Trigger WorkflowThe workflow to run, the branch or tag to run it on, and any inputs the workflow declares.

Output

The result of the operation—for example the created or fetched pull request, issue, branch, file, or commit. Some operations, such as a merge or a label change, return no payload.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.