Skip to content

GitHub connector

The built-in GitHub connector provides actions for repositories, issues, pull requests, commits, files, and workflow runs. It also includes repository event triggers. Connector availability can vary by environment.

  1. Open a workflow in the designer and add a trigger or action.
  2. Find GitHub in the connector picker and choose the operation you need.
  3. Select or create a connection.
  4. Select the repository owner and repository, then complete the operation’s required fields.
  5. Review the workflow and test it with a repository and data you’re authorized to use.
AreaSupported actions
Repositories and commitsGet a repository; list branches, tags, collaborators, and commits; get a commit; list check runs for a Git reference; get combined commit status; and create a commit status.
Files and Git objectsGet repository content; create or update file contents; delete a file; create and get blobs, commit objects, and trees; and get, create, update, or delete Git references.
IssuesList, create, get, and update issues; list and create comments; list assignees and repository labels; and add or remove labels.
Pull requestsList, create, get, update, and merge pull requests; list changed files; request reviewers; create a review comment; create and submit reviews; and update a pull request branch.
Workflow runs and releasesGet a workflow run, list runs for a workflow, and create a release.

List actions return a page of results. Where the action exposes page and per_page, increase page to retrieve subsequent pages and use per_page to set the page size. page defaults to 1; per_page defaults to 30 or 100 depending on the action. Available parameters vary by action.

ActionWhat it does
List repository issuesRetrieve issues for a repository. GitHub’s issues API can also return pull requests.
Create an issueOpen an issue in a repository.
Get issueRetrieve an issue by number.
Update an issueChange an existing issue, including its open or closed state.
List issue commentsRetrieve comments on an issue or pull request.
Create an issue commentAdd a comment to an issue or pull request.
List assigneesList users who can be assigned to issues in a repository.
List labels for a repositoryRetrieve the repository’s available labels.
Add labels to an issueApply labels to an issue.
Remove a label from an issueRemove a specific label from an issue.

For example, start with an issue event trigger and check that its action is opened. Then use Get issue to inspect the issue and Add labels to an issue or Create an issue comment to record the result. Checking the action prevents a label added by the workflow from being processed as another opened issue.

TriggerEvents
When an issue event occursIssue events, such as an issue being opened, edited, closed, reopened, or labeled.
When an issue comment event occursIssue comment events, such as a comment being created, edited, or deleted on an issue or pull request.
When a pull request event occursPull request events, such as a pull request being opened, closed, reopened, synchronized, or labeled.
When code is pushedCommits are pushed to a branch or tag.
When a check suite is requested, rerequested, or completedCheck suite events, such as a suite being requested, rerequested, or completed.
When a deployment status changesA deployment’s status changes.
When a label event occursLabel events, such as a repository label being created, edited, or deleted.
When a milestone event occursMilestone events, such as a milestone being created, edited, closed, opened, or deleted.
When a repository star is added or removedStar events, such as a repository gaining or losing a star.
When the repository is forkedA fork is created.
When a discussion event occursA discussion is created, edited, answered, or otherwise changed.
When a commit comment is createdCommit comment events, such as a comment being created on a commit.

These triggers subscribe to the GitHub event type, not a subset of its actions. Where the payload includes action, check it in a condition before processing the event. In particular, issue and pull request events include actions beyond the examples above, and a workflow’s own changes can trigger another run.

The deployment status trigger responds to status changes rather than a specific status. Use the returned status in a later condition to branch on a particular outcome.

An environment-specific GitHub Enterprise variant uses the same actions and triggers against its configured host. It requires explicit enablement and isn’t registered by default. Its presence doesn’t imply support for arbitrary GitHub Enterprise Server URLs; use only the variant and host offered by your environment.

For connection setup, permissions, and common issues, see shared connector guidance.