Rensei docs

GitHub

OAuth/PAT, webhook, and workflow nodes.

The GitHub integration enables workflows to interact with repositories: create and manage branches, open pull requests, read and modify files, post comments, and trigger workflows based on repository events.

What you can do

  • Branch operations: create, list, delete
  • Pull request management: create, merge, close, add reviewers, change title/description
  • File operations: read, create, modify, delete with full blob/tree access
  • Code review: create/update reviews, request reviewers
  • Checks and CI: create check runs, set commit status
  • Webhooks: receive push, pull_request, pull_request_review, check_run, and status events
  • Agent actions: agents can commit code, create PRs, and respond to CI failures

Connect GitHub

Authorize Rensei via OAuth (recommended)

  1. In Rensei, go to Settings → Integrations and select the GitHub card
  2. Click Connect
  3. You are redirected to GitHub's OAuth authorization flow
  4. Select the organization (or personal account) to authorize
  5. Click Authorize

The platform stores the OAuth token encrypted. OAuth is preferred over a PAT for team setups because access inherits the authorizing user's GitHub permissions.

Alternative: use a Personal Access Token

If OAuth is unavailable:

  1. In Rensei, go to Settings → Integrations → GitHub
  2. Click Use Personal Access Token
  3. Go to github.com/settings/tokensGenerate new token (classic)
  4. Required scopes:
    • repo - read/write access to repositories (public and private)
    • workflow - write access to GitHub Actions workflow files
    • read:org - read organization membership
  5. Copy the token and paste it into Rensei
  6. Click Connect

Configure webhooks on your repositories

Unlike Linear and Vercel, GitHub webhooks must be configured manually per repository.

After connecting, Rensei shows a Webhook URL and Webhook Secret in the integration settings. For each repository you want to trigger workflows from:

  1. Go to the repository on GitHub → Settings → Webhooks → Add webhook
  2. Fill in:
    • Payload URL: the URL from Rensei integration settings
    • Content type: application/json
    • Secret: the secret from Rensei integration settings
  3. Under Which events would you like to trigger this webhook? choose Let me select individual events and check:
    • Push - code pushed to any branch
    • Pull requests - PR opened, synchronized, closed, merged
    • Pull request reviews - reviews posted
    • Check runs - CI check results
    • Statuses - commit status updates
    • Workflow runs - GitHub Actions run completions (for GitHub Actions integration)
  4. Ensure Active is checked
  5. Click Add webhook

Repeat for every repository you want to use as a workflow trigger source.

Credential summary

MethodRequired scopes
OAuthInherits from GitHub OAuth app; covers repo, workflow, read:org
PAT (Classic)repo, workflow, read:org
Webhook endpointPOST /api/webhooks/ingest/github - HMAC-SHA256 on x-hub-signature-256

Event filtering

GitHub webhooks send a payload for every selected event type. Rensei workflows filter by:

  • Branch name (e.g., main, develop)
  • Event action (e.g., opened, synchronize, closed)
  • Commit author or PR author
  • Custom conditions using workflow expressions

Refer to workflow triggers for details.

Workflow nodes

All GitHub workflow nodes live in the GitHub section of the node palette. Available only when the GitHub integration is connected.

Triggers

NodePayload
trigger.github.pushBranch, commits, author, repository URL
trigger.github.pull_requestPR #, title, description, head/base branches, author, changed files
trigger.github.pull_request_reviewReview body, state (approved/changes_requested), reviewer
trigger.github.check_runCheck name, status, conclusion, output text

Branch operations

NodeDescription
github.branch.createCreate a new branch from a ref (commit SHA or branch name)
github.branch.getGet branch metadata (protected status, commit SHA)
github.branch.listList all branches in a repository
github.branch.deleteDelete a branch

Example: Create a branch for a feature request

- id: create_branch
  type: github.branch.create
  inputs:
    repo: "owner/repo"
    branchName: "feature/{{ $trigger.github.pull_request.title }}"
    fromRef: "main"  # or a commit SHA

Pull request operations

NodeDescription
github.pr.createCreate a pull request from one branch to another
github.pr.getGet PR details (title, description, state, reviewers)
github.pr.updateUpdate title, description, or base branch
github.pr.mergeMerge a PR (squash, rebase, or merge commit)
github.pr.closeClose a PR without merging
github.pr.request_reviewRequest reviewers on a PR
github.pr.request_review_removalRemove a review request
github.pr.list_reviewsList reviews and review comments

Example: Create a PR with an automated message

- id: create_pr
  type: github.pr.create
  inputs:
    repo: "owner/repo"
    title: "Fix: {{ $trigger.github.issue.title }}"
    body: |
      Automated fix for {{ $trigger.github.issue.url }}
      
      Changes:
      - Updated code
      - Added tests
    head: "feature/fix-{{ $trigger.id }}"
    base: "main"
    draft: false
    maintainer_can_modify: true

File operations

NodeDescription
github.file.readRead a file's contents (supports binary with base64 encoding)
github.file.createCreate a file in a repository (with commit message)
github.file.updateUpdate an existing file with new contents
github.file.deleteDelete a file
github.file.listList files in a directory

Example: Read a configuration file

- id: read_config
  type: github.file.read
  inputs:
    repo: "owner/repo"
    path: "config.json"
    ref: "main"  # optional; defaults to default branch

Example: Create a file with generated content

- id: create_file
  type: github.file.create
  inputs:
    repo: "owner/repo"
    path: "src/generated.ts"
    contents: "{{ $steps.agent.output }}"
    branch: "feature/generated"
    message: "Generated by Rensei agent"
    committer:
      name: "Rensei"
      email: "rensei@rensei.ai"

Code reviews

NodeDescription
github.review.createPost a code review (approve, request changes, or comment)
github.review.updateUpdate a review's state or body
github.review.list_commentsFetch review comments on a specific PR

Example: Approve a PR after checks pass

- id: approve
  type: github.review.create
  inputs:
    repo: "owner/repo"
    pr_number: "{{ $trigger.github.pull_request.number }}"
    event: "APPROVE"  # APPROVE | REQUEST_CHANGES | COMMENT
    body: "Approved by Rensei checks"

Commit status and checks

NodeDescription
github.status.createSet a commit status (pending, success, failure, error)
github.check_run.createCreate a check run with a conclusion and output
github.check_run.updateUpdate a check run's conclusion or output

Example: Create a check run after a test suite

- id: check_run
  type: github.check_run.create
  inputs:
    repo: "owner/repo"
    head_sha: "{{ $trigger.github.push.commits[0].id }}"
    name: "Rensei Tests"
    status: "completed"  # or 'in_progress'
    conclusion: "{{ $steps.tests.status == 'pass' ? 'success' : 'failure' }}"
    output:
      title: "Test Results"
      summary: |
        {{ $steps.tests.passed }}/{{ $steps.tests.total }} tests passed
      text: "{{ $steps.tests.log }}"

Repository metadata

NodeDescription
github.repo.getGet repository metadata (stars, language, topics, etc.)
github.repo.updateUpdate repository settings (description, topics, default branch)

Authentication and scope

The GitHub integration requires the following scopes:

  • repo - read/write access to public and private repositories
  • workflow - write access to GitHub Actions workflows
  • read:org - read-only access to organization metadata

If you use a Personal Access Token, create it with classic (not fine-grained) permissions to ensure all required scopes are granted.

Cost and rate limits

GitHub's REST API has rate limits:

  • Authenticated requests: 5,000 requests/hour
  • Workflow engines (agents) operating at scale may hit this limit if many work items dispatch in parallel

Recommendation: If you're running high-volume agent workflows, consider:

  1. Caching frequently-accessed data (e.g., branch lists) in workflow steps
  2. Batching multiple file operations into a single API call when possible
  3. Using GitHub's GraphQL API (advanced; not yet exposed as a workflow node)

Cost is zero - GitHub includes API calls in your personal or organization plan.

Troubleshooting

"Authentication failed"

  • Verify your GitHub token or OAuth grant is still valid
  • Re-authorize in Settings → Integrations
  • Check that the token has the required scopes

"Webhook delivery failed"

  • Ensure the webhook URL is publicly accessible
  • Check GitHub's webhook delivery logs (Settings → Webhooks → Recent Deliveries)
  • Verify the webhook secret matches what Rensei provided
  • Check Rensei's audit logs for inbound webhook errors

"API rate limit exceeded"

  • Wait 1 hour for your rate limit to reset
  • Use GraphQL (batching) for bulk operations (advanced)
  • Consider caching results in workflow steps to reduce API calls

Next steps

On this page