> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/human-connections/github/github.md).

# GitHub

<p align="center"><a class="button primary" data-icon="circle-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

<figure><img src="/files/iA11822GSBoJ4TUQq6gp" alt="" width="188"><figcaption></figcaption></figure>

<h3 align="center">Put GitHub to Work with @Human Automations and @Human Agents</h3>

<p align="center">The GitHub Connection documents all Triggers, Actions and Query Operations available for creating automations via the GitHub API.</p>

{% embed url="<https://www.youtube.com/watch?v=CyuUuaBSZzA>" %}

#### 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

### Related Operations

#### 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](/human-connections/github/github/action-add-labels-to-issue.md)

[Action: Create Branch](/human-connections/github/github/action-create-branch.md)

[Action: Delete Branch](/human-connections/github/github/action-delete-branch.md)

[Action: Create Issue](/human-connections/github/github/action-create-issue.md)

[Action: Create Comment](/human-connections/github/github/action-create-comment.md)

[Action: Create or Update File](/human-connections/github/github/action-create-or-update-file.md)

[Action: Create Gist](/human-connections/github/github/action-create-gist.md)

[Action: Create Pull Request](/human-connections/github/github/action-create-pull-request.md)

[Action: New Collaborator](/human-connections/github/github/action-new-collaborator.md)

[Action: New Branch](/human-connections/github/github/action-new-branch.md)

#### Query Operations

Example link

### Related Automations

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 picture** → **Preferences**.
3. **Left sidebar** → **Access** → **Personal access tokens** → **Personal access tokens (dropdown)**.
4. **Generate token** → **Generate 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

```
{
  "handle": "github",
  "status": "active",
  "meta": {
    "short": "GitHub",
    "description": "Connect to GitHub's API to manage repositories, issues, pull requests, and more.",
    "icon": "github",
    "tags": ["version-control", "development", "api"]
  },
  "service": {
    "baseURL": {
      "value": "https://api.github.com",
      "placeholders": [
        {
          "name": "owner",
          "type": "string",
          "description": "GitHub organization or user",
          "required": true,
          "default": ""
        },
        {
          "name": "repo",
          "type": "string",
          "description": "GitHub repository name",
          "required": true,
          "default": ""
        }
      ]
    },
    "protocol": "https",
    "contentType": "application/json",
    "headers": {
      "Accept": {
        "value": "application/vnd.github+json"
      },
      "X-GitHub-Api-Version": {
        "value": "2022-11-28"
      }
    },
    "auth": {
      "method": "apikey",
      "params": {
        "APIKeyHeader": {
          "value": "Authorization"
        },
        "apikey": {
          "value": "{{apikey}}",
          "placeholders": [
            {
              "name": "apikey",
              "type": "string",
              "description": "GitHub personal access token",
              "required": true,
              "default": ""
            }
          ]
        }
      }
    }
  }
}

```

### 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                               |

```
[
  {
    "handle": "repositories",
    "meta": { "short": "Repositories", "description": "Manage GitHub repositories." },
    "endpoint": { "value": "" },
    "fields": [
      { "name": "id", "type": "Integer", "selector": ["id"], "meta": { "description": "Unique identifier." } },
      { "name": "name", "type": "String", "selector": ["name"], "meta": { "description": "Repository name." } },
      { "name": "full_name", "type": "String", "selector": ["full_name"], "meta": { "description": "Full name including owner." } },
      { "name": "private", "type": "Boolean", "selector": ["private"], "meta": { "description": "Whether the repository is private." } },
      { "name": "html_url", "type": "String", "selector": ["html_url"], "meta": { "description": "URL to the repository." } },
      { "name": "description", "type": "String", "selector": ["description"], "meta": { "description": "Repository description." } },
      { "name": "default_branch", "type": "String", "selector": ["default_branch"], "meta": { "description": "Default branch." } },
      { "name": "language", "type": "String", "selector": ["language"], "meta": { "description": "Primary language." } },
      { "name": "created_at", "type": "DateTime", "selector": ["created_at"], "meta": { "description": "Creation timestamp." } },
      { "name": "updated_at", "type": "DateTime", "selector": ["updated_at"], "meta": { "description": "Last updated timestamp." } }
    ],
    "operations": {
      "list": { "method": "GET", "path": { "value": "/user/repos" } },
      "read": { "method": "GET", "path": { "value": "" } },
      "create": {
        "method": "POST", "path": { "value": "/user/repos" },
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"private\": {{private}}, \"description\": \"{{description}}\"}",
          "placeholders": [
            { "name": "name", "type": "String", "description": "Repository name.", "required": true },
            { "name": "private", "type": "Boolean", "description": "Private repository.", "required": false, "default": "false" },
            { "name": "description", "type": "String", "description": "Repository description.", "required": false }
          ]
        }
      },
      "update": {
        "method": "PATCH", "path": { "value": "" },
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"description\": \"{{description}}\", \"private\": {{private}}}",
          "placeholders": [
            { "name": "name", "type": "String", "description": "New name.", "required": false },
            { "name": "description", "type": "String", "description": "New description.", "required": false },
            { "name": "private", "type": "Boolean", "description": "Private flag.", "required": false }
          ]
        }
      },
      "delete": { "method": "DELETE", "path": { "value": "" } }
    },
    "webhooks": [
      {
        "event": "push", "path": "/webhooks/github/push",
        "payload": [
          { "name": "ref", "type": "String", "selector": ["ref"], "meta": { "description": "Full git ref pushed (e.g. refs/heads/main)." } },
          { "name": "repository", "type": "String", "selector": ["repository", "full_name"], "meta": { "description": "Repository full name." } },
          { "name": "pusher", "type": "String", "selector": ["pusher", "name"], "meta": { "description": "Pusher username." } },
          { "name": "head_commit_sha", "type": "String", "selector": ["head_commit", "id"], "meta": { "description": "HEAD commit SHA." } },
          { "name": "head_commit_message", "type": "String", "selector": ["head_commit", "message"], "meta": { "description": "HEAD commit message." } }
        ]
      },
      {
        "event": "create", "path": "/webhooks/github/create",
        "payload": [
          { "name": "ref", "type": "String", "selector": ["ref"], "meta": { "description": "Branch or tag name created." } },
          { "name": "ref_type", "type": "String", "selector": ["ref_type"], "meta": { "description": "Type: branch or tag." } },
          { "name": "repository", "type": "String", "selector": ["repository", "full_name"], "meta": { "description": "Repository full name." } }
        ]
      },
      {
        "event": "delete", "path": "/webhooks/github/delete",
        "payload": [
          { "name": "ref", "type": "String", "selector": ["ref"], "meta": { "description": "Branch or tag name deleted." } },
          { "name": "ref_type", "type": "String", "selector": ["ref_type"], "meta": { "description": "Type: branch or tag." } },
          { "name": "repository", "type": "String", "selector": ["repository", "full_name"], "meta": { "description": "Repository full name." } }
        ]
      }
    ]
  },
  {
    "handle": "branches",
    "meta": { "short": "Branches", "description": "Manage branches within a GitHub repository." },
    "endpoint": { "value": "/branches" },
    "fields": [
      { "name": "name", "type": "String", "selector": ["name"], "meta": { "description": "Branch name." } },
      { "name": "sha", "type": "String", "selector": ["commit", "sha"], "meta": { "description": "SHA of the latest commit." } },
      { "name": "protected", "type": "Boolean", "selector": ["protected"], "meta": { "description": "Whether the branch is protected." } }
    ],
    "operations": {
      "list": { "method": "GET", "path": { "value": "" } },
      "read": {
        "method": "GET",
        "path": { "value": "/{{branch}}", "placeholders": [{ "name": "branch", "type": "String", "description": "Branch name.", "required": true }] }
      },
      "create": {
        "method": "POST", "path": { "value": "/git/refs" },
        "bodyTemplate": {
          "value": "{\"ref\": \"refs/heads/{{branch}}\", \"sha\": \"{{sha}}\"}",
          "placeholders": [
            { "name": "branch", "type": "String", "description": "New branch name.", "required": true },
            { "name": "sha", "type": "String", "description": "SHA to branch from.", "required": true }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": { "value": "/git/refs/heads/{{branch}}", "placeholders": [{ "name": "branch", "type": "String", "description": "Branch to delete.", "required": true }] }
      }
    },
    "webhooks": []
  },
  {
    "handle": "issues",
    "meta": { "short": "Issues", "description": "Manage GitHub issues." },
    "endpoint": { "value": "/issues" },
    "fields": [
      { "name": "id", "type": "Integer", "selector": ["id"], "meta": { "description": "Unique identifier." } },
      { "name": "number", "type": "Integer", "selector": ["number"], "meta": { "description": "Issue number." } },
      { "name": "title", "type": "String", "selector": ["title"], "meta": { "description": "Issue title." } },
      { "name": "state", "type": "String", "selector": ["state"], "meta": { "description": "State: open or closed." } },
      { "name": "body", "type": "String", "selector": ["body"], "meta": { "description": "Issue body." } },
      { "name": "user_login", "type": "String", "selector": ["user", "login"], "meta": { "description": "Author login." } },
      { "name": "assignee_login", "type": "String", "selector": ["assignee", "login"], "meta": { "description": "Assignee login." } },
      { "name": "label_names", "type": "String", "selector": ["labels", 0, "name"], "meta": { "description": "Applied label names." }, "multivalue": true },
      { "name": "html_url", "type": "String", "selector": ["html_url"], "meta": { "description": "URL to the issue." } },
      { "name": "created_at", "type": "DateTime", "selector": ["created_at"], "meta": { "description": "Creation timestamp." } },
      { "name": "updated_at", "type": "DateTime", "selector": ["updated_at"], "meta": { "description": "Last updated timestamp." } },
      { "name": "closed_at", "type": "DateTime", "selector": ["closed_at"], "meta": { "description": "Closed timestamp." } }
    ],
    "operations": {
      "list": {
        "method": "GET", "path": { "value": "" },
        "queryParams": { "state": { "value": "{{state}}", "placeholders": [{ "name": "state", "type": "String", "description": "Filter: open, closed, all.", "required": false, "default": "open" }] } }
      },
      "read": {
        "method": "GET",
        "path": { "value": "/{{issue_number}}", "placeholders": [{ "name": "issue_number", "type": "Integer", "description": "Issue number.", "required": true }] }
      },
      "create": {
        "method": "POST", "path": { "value": "" },
        "bodyTemplate": {
          "value": "{\"title\": \"{{title}}\", \"body\": \"{{body}}\"}",
          "placeholders": [
            { "name": "title", "type": "String", "description": "Issue title.", "required": true },
            { "name": "body", "type": "String", "description": "Issue body.", "required": false }
          ]
        }
      },
      "update": {
        "method": "PATCH",
        "path": { "value": "/{{issue_number}}", "placeholders": [{ "name": "issue_number", "type": "Integer", "description": "Issue number.", "required": true }] },
        "bodyTemplate": {
          "value": "{\"title\": \"{{title}}\", \"state\": \"{{state}}\", \"body\": \"{{body}}\"}",
          "placeholders": [
            { "name": "title", "type": "String", "description": "New title.", "required": false },
            { "name": "state", "type": "String", "description": "New state: open or closed.", "required": false },
            { "name": "body", "type": "String", "description": "New body.", "required": false }
          ]
        }
      }
    },
    "webhooks": [
      {
        "event": "issues", "path": "/webhooks/github/issues",
        "payload": [
          { "name": "action", "type": "String", "selector": ["action"], "meta": { "description": "Action: opened, closed, edited, labeled, etc." } },
          { "name": "issue_number", "type": "Integer", "selector": ["issue", "number"], "meta": { "description": "Issue number." } },
          { "name": "issue_title", "type": "String", "selector": ["issue", "title"], "meta": { "description": "Issue title." } },
          { "name": "issue_state", "type": "String", "selector": ["issue", "state"], "meta": { "description": "Issue state." } },
          { "name": "sender_login", "type": "String", "selector": ["sender", "login"], "meta": { "description": "User who triggered the event." } },
          { "name": "repository", "type": "String", "selector": ["repository", "full_name"], "meta": { "description": "Repository full name." } }
        ]
      }
    ]
  },
  {
    "handle": "issue_comments",
    "meta": { "short": "Issue Comments", "description": "Manage comments on GitHub issues and pull requests." },
    "endpoint": { "value": "/issues/{{issue_number}}/comments" },
    "fields": [
      { "name": "id", "type": "Integer", "selector": ["id"], "meta": { "description": "Unique identifier." } },
      { "name": "body", "type": "String", "selector": ["body"], "meta": { "description": "Comment text." } },
      { "name": "user_login", "type": "String", "selector": ["user", "login"], "meta": { "description": "Author login." } },
      { "name": "html_url", "type": "String", "selector": ["html_url"], "meta": { "description": "URL to the comment." } },
      { "name": "created_at", "type": "DateTime", "selector": ["created_at"], "meta": { "description": "Creation timestamp." } },
      { "name": "updated_at", "type": "DateTime", "selector": ["updated_at"], "meta": { "description": "Last updated timestamp." } }
    ],
    "operations": {
      "list": { "method": "GET", "path": { "value": "" } },
      "read": {
        "method": "GET",
        "path": { "value": "/issues/comments/{{comment_id}}", "placeholders": [{ "name": "comment_id", "type": "Integer", "description": "Comment ID.", "required": true }] }
      },
      "create": {
        "method": "POST", "path": { "value": "" },
        "bodyTemplate": { "value": "{\"body\": \"{{body}}\"}", "placeholders": [{ "name": "body", "type": "String", "description": "Comment text.", "required": true }] }
      },
      "update": {
        "method": "PATCH",
        "path": { "value": "/issues/comments/{{comment_id}}", "placeholders": [{ "name": "comment_id", "type": "Integer", "description": "Comment ID.", "required": true }] },
        "bodyTemplate": { "value": "{\"body\": \"{{body}}\"}", "placeholders": [{ "name": "body", "type": "String", "description": "Updated comment text.", "required": true }] }
      },
      "delete": {
        "method": "DELETE",
        "path": { "value": "/issues/comments/{{comment_id}}", "placeholders": [{ "name": "comment_id", "type": "Integer", "description": "Comment ID.", "required": true }] }
      }
    },
    "webhooks": [
      {
        "event": "issue_comment", "path": "/webhooks/github/issue_comment",
        "payload": [
          { "name": "action", "type": "String", "selector": ["action"], "meta": { "description": "Action: created, edited, deleted." } },
          { "name": "comment_id", "type": "Integer", "selector": ["comment", "id"], "meta": { "description": "Comment ID." } },
          { "name": "comment_body", "type": "String", "selector": ["comment", "body"], "meta": { "description": "Comment body." } },
          { "name": "issue_number", "type": "Integer", "selector": ["issue", "number"], "meta": { "description": "Issue number." } },
          { "name": "sender_login", "type": "String", "selector": ["sender", "login"], "meta": { "description": "User who triggered the event." } },
          { "name": "repository", "type": "String", "selector": ["repository", "full_name"], "meta": { "description": "Repository full name." } }
        ]
      }
    ]
  },
  {
    "handle": "pull_requests",
    "meta": { "short": "Pull Requests", "description": "Manage pull requests in a GitHub repository." },
    "endpoint": { "value": "/pulls" },
    "fields": [
      { "name": "id", "type": "Integer", "selector": ["id"], "meta": { "description": "Unique identifier." } },
      { "name": "number", "type": "Integer", "selector": ["number"], "meta": { "description": "Pull request number." } },
      { "name": "title", "type": "String", "selector": ["title"], "meta": { "description": "Pull request title." } },
      { "name": "state", "type": "String", "selector": ["state"], "meta": { "description": "State: open or closed." } },
      { "name": "body", "type": "String", "selector": ["body"], "meta": { "description": "Pull request body." } },
      { "name": "head_ref", "type": "String", "selector": ["head", "ref"], "meta": { "description": "Source branch name." } },
      { "name": "base_ref", "type": "String", "selector": ["base", "ref"], "meta": { "description": "Target branch name." } },
      { "name": "merged", "type": "Boolean", "selector": ["merged"], "meta": { "description": "Whether merged." } },
      { "name": "html_url", "type": "String", "selector": ["html_url"], "meta": { "description": "URL to the pull request." } },
      { "name": "user_login", "type": "String", "selector": ["user", "login"], "meta": { "description": "Author login." } },
      { "name": "created_at", "type": "DateTime", "selector": ["created_at"], "meta": { "description": "Creation timestamp." } },
      { "name": "merged_at", "type": "DateTime", "selector": ["merged_at"], "meta": { "description": "Merge timestamp." } }
    ],
    "operations": {
      "list": {
        "method": "GET", "path": { "value": "" },
        "queryParams": { "state": { "value": "{{state}}", "placeholders": [{ "name": "state", "type": "String", "description": "Filter: open, closed, all.", "required": false, "default": "open" }] } }
      },
      "read": {
        "method": "GET",
        "path": { "value": "/{{pull_number}}", "placeholders": [{ "name": "pull_number", "type": "Integer", "description": "Pull request number.", "required": true }] }
      },
      "create": {
        "method": "POST", "path": { "value": "" },
        "bodyTemplate": {
          "value": "{\"title\": \"{{title}}\", \"body\": \"{{body}}\", \"head\": \"{{head}}\", \"base\": \"{{base}}\"}",
          "placeholders": [
            { "name": "title", "type": "String", "description": "PR title.", "required": true },
            { "name": "body", "type": "String", "description": "PR description.", "required": false },
            { "name": "head", "type": "String", "description": "Source branch.", "required": true },
            { "name": "base", "type": "String", "description": "Target branch.", "required": true }
          ]
        }
      },
      "update": {
        "method": "PATCH",
        "path": { "value": "/{{pull_number}}", "placeholders": [{ "name": "pull_number", "type": "Integer", "description": "PR number.", "required": true }] },
        "bodyTemplate": {
          "value": "{\"title\": \"{{title}}\", \"state\": \"{{state}}\", \"body\": \"{{body}}\"}",
          "placeholders": [
            { "name": "title", "type": "String", "description": "New title.", "required": false },
            { "name": "state", "type": "String", "description": "New state: open or closed.", "required": false },
            { "name": "body", "type": "String", "description": "New body.", "required": false }
          ]
        }
      }
    },
    "webhooks": [
      {
        "event": "pull_request", "path": "/webhooks/github/pull_request",
        "payload": [
          { "name": "action", "type": "String", "selector": ["action"], "meta": { "description": "Action: opened, closed, merged, edited, labeled, review_requested, etc." } },
          { "name": "pull_request_number", "type": "Integer", "selector": ["pull_request", "number"], "meta": { "description": "PR number." } },
          { "name": "pull_request_title", "type": "String", "selector": ["pull_request", "title"], "meta": { "description": "PR title." } },
          { "name": "pull_request_merged", "type": "Boolean", "selector": ["pull_request", "merged"], "meta": { "description": "Whether merged." } },
          { "name": "head_ref", "type": "String", "selector": ["pull_request", "head", "ref"], "meta": { "description": "Source branch." } },
          { "name": "base_ref", "type": "String", "selector": ["pull_request", "base", "ref"], "meta": { "description": "Target branch." } },
          { "name": "sender_login", "type": "String", "selector": ["sender", "login"], "meta": { "description": "User who triggered the event." } },
          { "name": "repository", "type": "String", "selector": ["repository", "full_name"], "meta": { "description": "Repository full name." } }
        ]
      }
    ]
  },
  {
    "handle": "releases",
    "meta": { "short": "Releases", "description": "Manage releases in a GitHub repository." },
    "endpoint": { "value": "/releases" },
    "fields": [
      { "name": "id", "type": "Integer", "selector": ["id"], "meta": { "description": "Unique identifier." } },
      { "name": "tag_name", "type": "String", "selector": ["tag_name"], "meta": { "description": "Associated tag." } },
      { "name": "name", "type": "String", "selector": ["name"], "meta": { "description": "Release name." } },
      { "name": "body", "type": "String", "selector": ["body"], "meta": { "description": "Release notes." } },
      { "name": "draft", "type": "Boolean", "selector": ["draft"], "meta": { "description": "Whether a draft." } },
      { "name": "prerelease", "type": "Boolean", "selector": ["prerelease"], "meta": { "description": "Whether a prerelease." } },
      { "name": "html_url", "type": "String", "selector": ["html_url"], "meta": { "description": "URL to the release." } },
      { "name": "published_at", "type": "DateTime", "selector": ["published_at"], "meta": { "description": "Publish timestamp." } }
    ],
    "operations": {
      "list": { "method": "GET", "path": { "value": "" } },
      "read": {
        "method": "GET",
        "path": { "value": "/{{release_id}}", "placeholders": [{ "name": "release_id", "type": "Integer", "description": "Release ID.", "required": true }] }
      },
      "create": {
        "method": "POST", "path": { "value": "" },
        "bodyTemplate": {
          "value": "{\"tag_name\": \"{{tag_name}}\", \"name\": \"{{name}}\", \"body\": \"{{body}}\", \"draft\": {{draft}}, \"prerelease\": {{prerelease}}}",
          "placeholders": [
            { "name": "tag_name", "type": "String", "description": "Tag name.", "required": true },
            { "name": "name", "type": "String", "description": "Release name.", "required": false },
            { "name": "body", "type": "String", "description": "Release notes.", "required": false },
            { "name": "draft", "type": "Boolean", "description": "Draft flag.", "required": false, "default": "false" },
            { "name": "prerelease", "type": "Boolean", "description": "Prerelease flag.", "required": false, "default": "false" }
          ]
        }
      },
      "update": {
        "method": "PATCH",
        "path": { "value": "/{{release_id}}", "placeholders": [{ "name": "release_id", "type": "Integer", "description": "Release ID.", "required": true }] },
        "bodyTemplate": {
          "value": "{\"tag_name\": \"{{tag_name}}\", \"name\": \"{{name}}\", \"body\": \"{{body}}\"}",
          "placeholders": [
            { "name": "tag_name", "type": "String", "description": "Updated tag name.", "required": false },
            { "name": "name", "type": "String", "description": "Updated release name.", "required": false },
            { "name": "body", "type": "String", "description": "Updated notes.", "required": false }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": { "value": "/{{release_id}}", "placeholders": [{ "name": "release_id", "type": "Integer", "description": "Release ID.", "required": true }] }
      }
    },
    "webhooks": [
      {
        "event": "release", "path": "/webhooks/github/release",
        "payload": [
          { "name": "action", "type": "String", "selector": ["action"], "meta": { "description": "Action: published, created, edited, deleted, released." } },
          { "name": "release_id", "type": "Integer", "selector": ["release", "id"], "meta": { "description": "Release ID." } },
          { "name": "release_tag_name", "type": "String", "selector": ["release", "tag_name"], "meta": { "description": "Tag name." } },
          { "name": "repository", "type": "String", "selector": ["repository", "full_name"], "meta": { "description": "Repository full name." } }
        ]
      }
    ]
  },
  {
    "handle": "gists",
    "meta": { "short": "Gists", "description": "Manage GitHub Gists for sharing code snippets." },
    "endpoint": { "value": "/gists" },
    "fields": [
      { "name": "id", "type": "String", "selector": ["id"], "meta": { "description": "Unique identifier." } },
      { "name": "description", "type": "String", "selector": ["description"], "meta": { "description": "Gist description." } },
      { "name": "public", "type": "Boolean", "selector": ["public"], "meta": { "description": "Whether public." } },
      { "name": "html_url", "type": "String", "selector": ["html_url"], "meta": { "description": "URL to the gist." } },
      { "name": "owner_login", "type": "String", "selector": ["owner", "login"], "meta": { "description": "Owner login." } },
      { "name": "created_at", "type": "DateTime", "selector": ["created_at"], "meta": { "description": "Creation timestamp." } },
      { "name": "updated_at", "type": "DateTime", "selector": ["updated_at"], "meta": { "description": "Last updated timestamp." } }
    ],
    "operations": {
      "list": { "method": "GET", "path": { "value": "" } },
      "read": {
        "method": "GET",
        "path": { "value": "/{{gist_id}}", "placeholders": [{ "name": "gist_id", "type": "String", "description": "Gist ID.", "required": true }] }
      },
      "create": {
        "method": "POST", "path": { "value": "" },
        "bodyTemplate": {
          "value": "{\"description\": \"{{description}}\", \"public\": {{public}}, \"files\": {\"{{filename}}\": {\"content\": \"{{content}}\"}}}",
          "placeholders": [
            { "name": "description", "type": "String", "description": "Gist description.", "required": false },
            { "name": "public", "type": "Boolean", "description": "Whether public.", "required": false, "default": "false" },
            { "name": "filename", "type": "String", "description": "File name.", "required": true },
            { "name": "content", "type": "String", "description": "File content.", "required": true }
          ]
        }
      },
      "update": {
        "method": "PATCH",
        "path": { "value": "/{{gist_id}}", "placeholders": [{ "name": "gist_id", "type": "String", "description": "Gist ID.", "required": true }] },
        "bodyTemplate": { "value": "{\"description\": \"{{description}}\"}", "placeholders": [{ "name": "description", "type": "String", "description": "New description.", "required": false }] }
      },
      "delete": {
        "method": "DELETE",
        "path": { "value": "/{{gist_id}}", "placeholders": [{ "name": "gist_id", "type": "String", "description": "Gist ID.", "required": true }] }
      }
    },
    "webhooks": []
  },
  {
    "handle": "commits",
    "meta": { "short": "Commits", "description": "Retrieve commit history and details for a repository." },
    "endpoint": { "value": "/commits" },
    "fields": [
      { "name": "sha", "type": "String", "selector": ["sha"], "meta": { "description": "Commit SHA." } },
      { "name": "message", "type": "String", "selector": ["commit", "message"], "meta": { "description": "Commit message." } },
      { "name": "author_name", "type": "String", "selector": ["commit", "author", "name"], "meta": { "description": "Author name." } },
      { "name": "author_email", "type": "String", "selector": ["commit", "author", "email"], "meta": { "description": "Author email." } },
      { "name": "author_date", "type": "DateTime", "selector": ["commit", "author", "date"], "meta": { "description": "Commit timestamp." } },
      { "name": "committer_login", "type": "String", "selector": ["committer", "login"], "meta": { "description": "GitHub login of committer." } },
      { "name": "html_url", "type": "String", "selector": ["html_url"], "meta": { "description": "URL to the commit." } }
    ],
    "operations": {
      "list": {
        "method": "GET", "path": { "value": "" },
        "queryParams": { "sha": { "value": "{{sha}}", "placeholders": [{ "name": "sha", "type": "String", "description": "Branch, tag, or SHA to start from.", "required": false }] } }
      },
      "read": {
        "method": "GET",
        "path": { "value": "/{{commit_sha}}", "placeholders": [{ "name": "commit_sha", "type": "String", "description": "Commit SHA.", "required": true }] }
      }
    },
    "webhooks": []
  },
  {
    "handle": "users",
    "meta": { "short": "Users", "description": "Retrieve information about GitHub users." },
    "endpoint": { "value": "/users/{{username}}" },
    "fields": [
      { "name": "id", "type": "Integer", "selector": ["id"], "meta": { "description": "Unique identifier." } },
      { "name": "login", "type": "String", "selector": ["login"], "meta": { "description": "GitHub login." } },
      { "name": "name", "type": "String", "selector": ["name"], "meta": { "description": "Display name." } },
      { "name": "email", "type": "String", "selector": ["email"], "meta": { "description": "Public email." } },
      { "name": "bio", "type": "String", "selector": ["bio"], "meta": { "description": "User biography." } },
      { "name": "company", "type": "String", "selector": ["company"], "meta": { "description": "Company." } },
      { "name": "location", "type": "String", "selector": ["location"], "meta": { "description": "Location." } },
      { "name": "html_url", "type": "String", "selector": ["html_url"], "meta": { "description": "URL to profile." } },
      { "name": "public_repos", "type": "Integer", "selector": ["public_repos"], "meta": { "description": "Number of public repos." } },
      { "name": "followers", "type": "Integer", "selector": ["followers"], "meta": { "description": "Follower count." } },
      { "name": "following", "type": "Integer", "selector": ["following"], "meta": { "description": "Following count." } },
      { "name": "created_at", "type": "DateTime", "selector": ["created_at"], "meta": { "description": "Account creation timestamp." } }
    ],
    "operations": {
      "read": { "method": "GET", "path": { "value": "" } }
    },
    "webhooks": []
  }
]

```

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.planetcrust.com/human-connections/github/github.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
