Skip to content

[Bug] /install-code-review single-repo flow always says the GitHub App isn't installed #126

Backlog

Description

@angelafeliciaa

Summary

Step 5 of the single-repo flow runs:

gh api /repos/{owner}/{repo}/installation --jq '.id' 2>/dev/null

That endpoint only accepts a GitHub App JWT (docs). A gh user token always gets a 401, which 2>/dev/null hides. Droid then says the app isn't installed and stops, even when it is.

$ gh api /repos/cli/cli/installation
{"message":"A JSON web token could not be decoded","status":"401"}

Environment

  • Droid CLI: 1.24.0
  • gh: 2.102.1 (gh auth login, scopes repo, read:org, workflow)
  • macOS (arm64)

Steps to reproduce

  1. In a repo with origin = https://github.com/cli/cli.git, run /install-code-review.
  2. Choose this repo only.
  3. Prereqs pass. Step 5 returns nothing, and Droid says the app isn't installed and stops.

Suggested fix

Use /orgs/{owner}/installations, which works with a user token. The org-wide flow already uses it.

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