Gen6

GitHub

Interact with GitHub

GitHub is the world’s leading code hosting platform that enables collaboration, version control, and automation for developers and teams.

With GitHub, you can:

  • Host repositories — Store public or private code with Git versioning.
  • Manage pull requests — Review and merge contributions efficiently.
  • Track issues and discussions — Organize bugs, feature requests, and tasks.
  • Automate workflows — Use GitHub Actions for CI/CD and task automation.
  • Collaborate securely — Manage permissions, reviews, and API access for teams.

In Gen6, the GitHub integration allows your agents to interact directly with repositories — fetching commits, posting PR comments, retrieving repo metadata, and automating reviews.
This bridges your AI workflows with your software projects for seamless collaboration.


How to Get a GitHub Personal Access Token (PAT Classic)

Follow these steps to generate a Personal Access Token (Classic) which grants your agent access to the GitHub API:

Step 1: Go to GitHub Settings

  1. Log in to your GitHub account.
  2. In the top-right corner, click your profile icon → Settings.

Step 2: Open Developer Settings

  1. In the left sidebar, scroll down and click Developer settings.
  2. Then select Personal access tokens → Tokens (classic).

Step 3: Generate a New Token

  1. Click Generate new token → Generate new token (classic).
  2. Enter a token name (e.g., Gen6 Integration).
  3. (Optional) Set an expiration — “No expiration” is fine for local setups, but you can choose a shorter duration for security.
  4. Select Scopes (permissions). Common scopes include:
    • repo — full control of private repositories
    • read:user — read profile information
    • user:email — access verified email address
    • workflow — manage GitHub Actions workflows

Step 4: Generate and Save Your Token

  1. Click Generate token at the bottom.
  2. Copy your token immediately — you won’t see it again!
    Example: ghp_aBcD1234EfGhI567*******************
  3. Store it in a secure location (e.g., .env file, secret manager).

Step 5: Use in Gen6 or API Calls

Paste your token into the apiKey or apiToken field when configuring GitHub tool blocks.

Security Tip: Never share your PAT publicly or commit it to your repo. Treat it like a password.


Usage Instructions

The GitHub tools in Gen6 let your agents:

  • Fetch pull request data (titles, diffs, and commits)
  • Comment on open PRs
  • Retrieve repository metadata and statistics
  • Get the latest commits across branches

Tools

github_pr

Fetch pull request details (including diffs and files changed).

Input

ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pullNumbernumberYesPull request number
apiKeystringYesGitHub PAT (classic) token

Output

ParameterTypeDescription
contentstringResponse content
metadatajsonResponse metadata

Screenshot

GitHub PR details


github_comment

Post comments on pull requests.

Input

ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pullNumbernumberYesPR number
bodystringYesComment content
apiKeystringYesGitHub PAT (classic) token

Output

ParameterTypeDescription
contentstringResponse content
metadatajsonResponse metadata

Screenshot

GitHub PR comment block


github_repo_info

Retrieve repository metadata — stars, forks, language, and more.

Input

ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
apiKeystringYesGitHub PAT (classic) token

Output

ParameterTypeDescription
contentstringRepository data
metadatajsonResponse metadata

Screenshot

GitHub repo info block


github_latest_commit

Get the latest commit details for a branch.

Input

ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
branchstringNoBranch name (defaults to main)
apiKeystringYesGitHub PAT (classic) token

Output

ParameterTypeDescription
contentstringCommit details
metadatajsonResponse metadata

Screenshot

GitHub latest commit block

Notes

  • Category: tools
  • Type: github
  • Works with Personal Access Token (Classic) or fine-grained PATs if configured properly.
  • Requires repo scope for private repositories and read:user for profile queries.
  • You can manage and revoke tokens anytime under
  • Settings → Developer Settings → Personal Access Tokens (classic).
GitHub