Skip to content

Feat(report): Add the Issues: Assigned to Me table - #230

Merged
ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-224
Oct 29, 2026
Merged

ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-224

Conversation

@lf-releng-code-monkey-bot

@lf-releng-code-monkey-bot lf-releng-code-monkey-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #224

Authored by an AI agent; human review required
Command Exit
uv run pytest -q tests/test_issues.py tests/test_client.py 0
uv run pytest -q -x 0
prek run --files README.md src/github_security_report/client/parsers.py src/github_security_report/issue_presentation.py src/github_security_report/models.py tests/test_client.py tests/test_issues.py 0
PATH=.venv/bin:$PATH aislop scan --base e792fe9 --json . (0 diagnostics, no engine skipped) 0
git commit --amend -s -F <msg> (prek pre-commit and gitlint commit-msg hooks) 0

The github-code-monkey-bot workflow opened this pull request.
Nobody has merged it; a maintainer must review it first.
Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds; a maintainer must act on any finding that remains after that, and reviews every round before merge.

Round 1 of revision, on its base.


Adds an Issues: Assigned to Me table (github_issues_assigned) for #224. It mirrors Pull Requests → Assigned to Me: it repeats the GitHub Issues table, with the same columns, narrowed to the open issues assigned to the account the report runs as.

What it does

  • Requests assignees on the existing batched issues connection and parses them into IssueRef.assignees. It makes no new HTTP request.
  • build_assigned_issues_table shares one table body with build_issues_table. Total counts only the assigned issues inside the 25-issue window. A repository whose backlog runs past the window and has none of the viewer's issues inside it is reported as unknown, not clean.
  • The category is terminal-only by default and absent under a bot or App token. It supports the standard enabled/outputs/top_n/sort toggles and --hide. It sits after GitHub Issues in BAU and is written to report.json as assigned_issues.
  • The README documents the table, its visibility and the window caveat.

Changed in review round 1

  • Copilot found a case where the assigned table reported an exact Oldest age it could not justify. If an unreadable issue node came after an unassigned issue but before the first assigned one, the age was shown as exact and coloured, even though the unreadable node could be an older assigned issue. The parser now records where the first unreadable node sits (RepoGraphData.issue_gap, which replaces oldest_issue_unreadable). Oldest reads unknown whenever such a node precedes the first selected issue. The whole-backlog table behaves as before. Regression tests cover a gap before and after the first match, plus the parser's gap position.

Validation

  • uv run pytest -q: 1458 passed
  • prek run --files <changed files>: clean, gitlint included
  • aislop scan --base e792fe9 with ruff on PATH: zero diagnostics, no engine skipped

For reviewers

  • The graphql point estimate in the commit body was computed, not measured. No GitHub token was available to run the five-repository batch.
  • The wording of the unknown Oldest caveat in the table description changed to cover both causes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The assigned-issue table can report an unjustifiably exact age and misleading colouring when an unreadable node may conceal an older assigned issue.

1 open issue
What changed in this PR

Adds an Issues: Assigned to Me table alongside the existing personal pull-request queue, addressing #224. It reuses collected issue data and defaults to terminal-only visibility.

Changes:

  • Collects issue assignees and builds a viewer-filtered table with partial-window handling.
  • Integrates the category into configuration, ordering, collection, and JSON output.
  • Documents visibility controls and adds tests for filtering and report integration.
File Description
tests/​test_layout.py Tests placement after GitHub Issues.
tests/​test_issues.py Tests assignment filtering, counts, truncation, and age.
tests/​test_config.py Tests terminal-only defaults.
tests/​test_config_order.py Updates expected default ordering.
tests/​test_collect.py Tests personal-queue collection guards.
tests/​test_client.py Tests assignee queries and parsing.
tests/​test_cli.py Tests publication and hiding; distinguishes queue titles.
src/​github_security_report/​report/​aggregate.py Registers the assigned-issues table.
src/​github_security_report/​models.py Adds issue assignee data.
src/​github_security_report/​issues.py Shares table construction and adds assignment filtering.
src/​github_security_report/​issue_presentation.py Extracts shared issue-table presentation helpers.
src/​github_security_report/​config/​order.py Places assigned issues after GitHub Issues.
src/​github_security_report/​config/​models.py Sets terminal-only category defaults.
src/​github_security_report/​collect/​extras.py Builds the table when a viewer is identified.
src/​github_security_report/​collect/​context.py Updates collection-option documentation.
src/​github_security_report/​client/​queries.py Requests assignees in the existing issue query.
src/​github_security_report/​client/​parsers.py Parses issue assignee logins.
src/​github_security_report/​cli/​serialise.py Adds the assigned_issues JSON field.
src/​github_security_report/​categories/​tables.py Defines category labels and description.
src/​github_security_report/​categories/​keys.py Adds the category key.
README.md Documents the table, visibility controls, and collection limits.

Review effort: Balanced

Mirror Pull Requests -> Assigned to Me for issues: a new
github_issues_assigned category repeats the GitHub Issues table
narrowed to the open issues assigned to the account the report ran
as. It shares the PR version's rules: terminal-only by default,
absent under a bot or App token, and governed by the standard
enabled/outputs/top_n/sort toggles and --hide.

The issues connection in the batched prefetch now requests each
issue's assignees, parsed into IssueRef.assignees as lower-cased
logins. No new HTTP request is made. By GitHub's formula
(connection requests / 100) the extra connection adds 25 requests
per repository, about 1.25 points per five-repository batch, so the
measured 4 points should become about 5; this was computed, not
measured, as the session had no GitHub token.

The Issues builder now runs over an optional viewer filter, so both
tables share one body and the same columns. In the assigned table
Total counts the assigned issues in the window, since totalCount is
not assignee-filtered, and a repository whose backlog exceeds the
window with none of the viewer's issues inside it is unknown rather
than clean, as in the PR version. The presentation helpers move to
issue_presentation.py to keep issues.py under 400 lines.

Tests and code land together: mypy checks tests/, so expected-fail
tests naming the new key, field and builder would fail the
type-check hook before the code exists.

Review round 1 (Copilot, thread on issue_presentation.py): the parser
only flagged a gap before the window's first survivor, so in the
assigned table an unreadable node after an unassigned issue but before
the first match was ignored and the match's age reported as exact and
coloured, though the node could be an older assigned issue. The parser
now records how many readable issues precede the first gap
(RepoGraphData.issue_gap, replacing oldest_issue_unreadable), and the
Oldest age is unknown whenever the first selected issue does not sit
before it. The whole-backlog table behaves as before; regression tests
cover a gap before and after the first match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The required five-repository GraphQL check has only an estimate, so a maintainer must verify the added query’s point cost and unchanged HTTP request count against GitHub.

No open issues 🎉

Review effort: Balanced

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit cc54075 into lfreleng-actions:main Oct 29, 2026
28 checks passed
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions deleted the code-monkey/issue-224 branch October 29, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add additional "Issues: assigned to me" category

2 participants