Skip to content

Document and check the minimum gh version for GitHub App workers #258

Description

@danny-avila

The worker injects GH_TOKEN so agents can use gh, but does not check the installed gh. Distribution packages lag far behind: Ubuntu's apt gh is 2.45.0. In that version, gh pr edit always requests the retired Projects (classic) projectCards field (pkg/cmd/pr/edit/edit.go), so every edit fails:

GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience ... (repository.pullRequest.projectCards)

Current gh uses feature detection (cli/cli#10942, with the remaining case fixed in v2.82.1), and the maintainers direct users to the official apt repository rather than distro packages (cli/cli#11983, cli/cli#13069). On one trusted-VM deployment, agents hit this 54 times in 9 days and fell back to gh api -X PATCH.

Proposal

  • README / worker runbook: require gh >= 2.82.1 from GitHub's official apt repository when GitHub App auth is enabled, with the install commands.
  • At startup (or in a doctor command), when GitHub App auth is configured and gh is on PATH, log a warning if gh --version is older than the minimum.

Acceptance

  • The runbook states the minimum version and install source.
  • A worker with an older gh logs one clear warning at startup naming the installed and required versions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions