Skip to content

fix: check code review bot fails to resolve linked issues, reporting "no linked issues" context gap #31

Description

@ivanaf03

Observed

The bot posts a "⚠️ Context gaps" warning stating the PR references an issue but "the API returned no linked issues," and explicitly notes this may be caused by:

  • the workflow's permissions: block missing the scope needed to read linked issues, and/or
  • the PR not targeting the default branch.

As a result, the review runs without the issue's specification (acceptance criteria), reducing its usefulness — this happens intermittently, not on every PR.

Expected

When a PR references an issue via a standard closing keyword or link, the bot should reliably resolve and fetch that issue's content (title, description, acceptance criteria) regardless of whether the PR targets the default branch, and use it as context for the review.

Steps to reproduce

  1. Open a PR whose description references an issue via a closing keyword (e.g. "Closes #1139") or via the issue's full title/number.
  2. Trigger the code review bot workflow on that PR.
  3. Observe the bot's output.

Impact

S2 · a flow is degraded, workaround exists

Evidence

Image

Acceptance criteria

  • The bot successfully resolves a linked issue on a PR that does NOT target the default branch.
  • The workflow's permissions: block is confirmed to grant read access to linked issues (e.g. issues: read / pull-requests: read as required by the API used), and this is verified by a test or check, not just inspection.
  • When linked-issue resolution fails for a documented reason, the bot's message states which specific cause applies, instead of a generic "no linked issues" warning.

Context pointers

No response

Reported by

Software team, 21-9-2026

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions