Skip to main content
GitHub actions read and write pull requests through a configured GitHub App integration. They are how an agent sees a diff, reads the conversation on a pull request, and replies to it.
Both actions need a github_app integration. See Configuration Reference for setup details.

github_fetch

Reads pull request context — metadata, the diff, or the conversation — as a GitHub App.

GitHub App

The GitHub App integration to act as. It carries the App credentials and its installation.

Repo

The repository, as owner/name.

PR Number

The pull request number to read.

Resource

Which part of the pull request to read. Allowed values: pr_meta, pr_diff, pr_conversation

Output

The output depends on resource:

Example


github_post

Posts a comment on a GitHub pull request as a GitHub App.

GitHub App

The GitHub App integration to act as. It carries the App credentials and its installation.

Repo

The repository, as owner/name.

PR Number

The pull request number to comment on.

Body

The comment body, in GitHub-flavored markdown.

Resource

What to post. Allowed values: issue_comment

Output

{{ .step_id }} holds the comment GitHub created, as GitHub returned it. Its html_url addresses the new comment.

Example


Common Patterns

Read the Diff, Then Comment

Fetch a pull request’s diff, review it, and post the result:

Give an Agent a Posting Tool

Rather than posting in a fixed step, let the agent decide when to comment by giving it github_post as an action tool.

Next Steps

AI Agents

Give an agent GitHub actions as tools.

Discord

Read and send Discord messages.

HTTP Requests

Call any other API directly.

Actions Overview

Learn the fundamentals of ServFlow actions.