BLOG / DEVELOPER TOOLS AND INTEGRATIONS

Use an AI Coding CLI with GitHub Issues and Pull Requests

A GitHub issue connected to a local coding task and a pull request for review
A GitHub issue connected to a local coding task and a pull request for review

A coding task often starts as a GitHub issue and ends as a pull request. A terminal agent can help with the repository work in between, while GitHub CLI commands keep the issue and review steps close to the code. The important boundary is simple: let the agent prepare a change, then inspect and test that change before asking anyone to merge it.

Bring the issue into the repository workflow

Read the issue, its discussion, and any linked design or reproduction notes before asking for an edit. A title alone may omit the expected behavior or the reason for the request. You can use the GitHub CLI to view an issue from the terminal, but the coding agent should receive only the context needed for the task.

Start from an up to date branch and create a task branch before editing. State which issue the change addresses, what must remain unchanged, and which test demonstrates completion. Do not ask the agent to infer acceptance criteria from a vague label such as “clean this up.”

  1. Read the full issue and confirm the intended result.
  2. Create a separate branch from the correct base.
  3. Ask for a plan and likely files before a broad change.
  4. Keep each change small enough to inspect in a diff.

Review the patch before creating a pull request

Check the diff for unrelated edits, generated files, secrets, and changes to tests that do not match the request. Run the repository checks and look at the actual output. If a test fails, report the failure accurately instead of asking the agent to make the final response sound successful.

A tool can help draft a pull request summary, but it cannot replace your review of the claims in that summary. Confirm that the branch is based on the intended target and that any issue reference has the effect you expect when merged.

Use GitHub CLI as a deliberate handoff

The GitHub CLI offers commands for working with issues and creating or reviewing pull requests. Its authentication and permissions come from the signed in GitHub account. Check the command flags and requested scopes before granting access, especially if an agent can run shell commands in the same environment.

Create the pull request after the change is ready for another person to review. A draft can be useful when checks or discussion are still in progress. Keep merge and release permissions separate from the agent task unless your team has an explicit process for those actions.

Sources and further reading