Skip to content

Fix bug in "Issue Trigger" causing an edge-case failure at the dev multi-issue assignment check #8634

@t-will-gillis

Description

@t-will-gillis

Prerequisites

  1. Be a member of Hack for LA. (There are no fees to join.) If you have not joined yet, please follow the steps on our Getting Started page and attend an onboarding session.
  2. You have already read our How to Contribute to Hack for LA Guide.

Overview

We need to fix a bug in the "Issue Trigger" workflow so the automation functions as intended.

Details

Recently (5/9/26), a junior dev had (3) open PRs on the "Pull Request" board, which the "Issue Trigger" workflow should prevent. A review of one of the latest "Issue Trigger" workflow logs shows that a failure occurs when a GraphQL call is made to a non-existent issue.

Error message Image

The error can be traced back to assignedToAnotherIssue() in preliminary-update-comment.js , where the GitHub API returns both issues and PRs when the automation queries all issues assigned to a developer. The subsequent queryIssueInfo() makes a GraphQL call which fails because the query expects issues only, not PRs.

function assignedToAnotherIssue() Image

A solution to this problem is to filter the results of assignedToAnotherIssue() to return only issues.

Action Items

  • In preliminary-update-comment.js, add filter so that only issues are returned from assignedToAnotherIssue():
        const issues = (await github.rest.issues.listForRepo({
        owner: context.repo.owner,
        repo: context.repo.repo,
        assignee: assignee
      })).data;
    
    with:
        const issues = (await github.rest.issues.listForRepo({
        owner: context.repo.owner,
        repo: context.repo.repo,
        assignee: assignee
      })).data.filter(issue => !issue.pull_request);
    
  • Demonstrate that this solution returns only issues, and not PRs, and that the automation functions correctly with this change.

Resources/Instructions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

In progress (actively working)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions