Skip to main content

GitHub And PR Automation

X4 integrates with GitHub through the GitHub CLI or a GitHub App.

PR Commands​

x4 pr plan
x4 pr create --dry-run
x4 pr create --draft --push
x4 pr comment-preview
x4 pr comment-status
x4 pr check-run

Use x4 pr plan and dry-run commands before mutating GitHub. Remove --dry-run, add --push, or add --execute only when the target PRs, issues, branches, and credentials are intentional.

Workflow Commands​

x4 workflow smoke
x4 workflow submit-pr

x4 workflow smoke is the harmless end-to-end workflow proof. By default it is a planner. With --full --execute, it can add marker files, create split commits, open linked draft PRs, start the configured sandbox, serve tailnet-only preview routes, post preview evidence, and trigger validation through the poller or direct control submission.

x4 workflow submit-pr is the developer-facing path from workspace changes to draft PRs. It can:

  • rename temporary session branches;
  • commit per repo;
  • push branches;
  • create draft PRs;
  • run validation through poller or control submission;
  • post status comments and check runs.

Issue Commands​

x4 issue create-linked
x4 issue comment-evidence

Linked issues are useful when a multi-repo feature needs issue records in each repo. X4 stores mappings in .x4/issues.yaml.

GitHub App Commands​

x4 github app validate
x4 github poll
x4 github poller prepare-workspace
x4 github poller status
x4 github command run
x4 github command status <command-id>
x4 github command logs <command-id>

The poller watches for /x4 test comments and updated open PR heads. It writes poll records under .x4/github-poller/runs/ and delegates matching work to x4 github command run.

/x4 test Flow​