DEV

GitHub

GitHub Connection

Put GitHub to Work with @Human Automations and @Human Agents

The GitHub Connection documents all Triggers, Actions and Query Operations available for creating automations via the GitHub API.

What can you do with the GitHub Connection?

  • Connect to the GitHub API in a few clicks

  • Use the related GitHub Operations (see below) in @Human Automations or @Human Agents

Trigger Operations

Repository Push

Triggers on: repositories/push

Triggered when commits are pushed to a repository branch or tag.

Branch or Tag Created

Triggers on: repositories/create

Triggered when a branch or tag is created in a repository.

Branch or Tag Deleted

Triggers on: repositories/delete

Triggered when a branch or tag is deleted from a repository.

Issue Activity

Triggers on: issues/issues

Triggered when an issue is opened, closed, edited, labeled, or otherwise actioned.

Issue Comment Activity

Triggers on: issue_comments/issue_comment

Triggered when a comment on an issue or pull request is created, edited, or deleted.

Pull Request Activity

Triggers on: pull_requests/pull_request

Triggered when a pull request is opened, closed, merged, edited, labeled, or has a review requested.

Release Activity

Triggers on: releases/release

Triggered when a release is published, created, edited, deleted, or released.

Action Operations

Action: Add Labels to Issue

Action: Create Branch

Action: Delete Branch

Action: Create Issue

Action: Create Comment

Action: Create or Update File

Action: Create Gist

Action: Create Pull Request

Action: New Collaborator

Action: New Branch

Query Operations

Example link

Example link

Obtaining Access Credentials

To obtain a Personal Access Token (PAT) for GitHub (system-to-system access), follow these steps:

Prerequisites

  • A GitHub account (personal or organization, depending on scope).

  • Admin/owner permissions if generating a token for an organization.

Steps

  1. Log in to your GitHub account.

  2. Top-right corner → Click your profile picturePreferences.

  3. Left sidebarAccessPersonal access tokensPersonal access tokens (dropdown).

  4. Generate tokenGenerate legacy token.

  5. Configure the token:

    • Note: Add a descriptive name (e.g., "API Access").

    • Expiration: Set as needed (default: 30 days; max: 1 year for classic PATs).

    • Scopes: Select required permissions (e.g., repo, admin:org, workflow).

  6. Generate token → Copy the token immediately (it won’t be shown again).

  7. Store securely (e.g., secrets manager, encrypted file).

Configuring Webhooks

  1. Navigate to your GitHub repository or organization.

  2. Settings tab → Code and automation (sidebar) → Webhooks.

  3. Click Add webhook.

  4. Payload URL → Enter the destination URL.

  5. Content type → Select application/json.

  6. Secret → Provide a secret token.

  7. Select trigger events:

    • Just the push event

    • Send me everything

    • Let me select individual events

  8. Ensure Active is selected.

  9. Click Add webhook.

Code (Apache v2.0): Service Connectivity and Metadata

Code (Apache v2.0): List of External Resources and Internal Mapping

Available resources: repositories, branches, issues, issue_comments, pull_requests, releases, gists, commits, users.

Handle
Endpoint
Operations

repositories

/

list, read, create, update, delete

branches

/branches

list, read, create, delete

issues

/issues

list, read, create, update

issue_comments

/issues/{{issue_number}}/comments

list, read, create, update, delete

pull_requests

/pulls

list, read, create, update

releases

/releases

list, read, create, update, delete

gists

/gists

list, read, create, update, delete

commits

/commits

list, read

users

/users/{{username}}

read

Last updated