Skip to content

Raise Fbe::Error in pull_request_reviews when repository is missing - #667

Open
Thayorns wants to merge 2 commits into
zerocracy:masterfrom
Thayorns:657
Open

Raise Fbe::Error in pull_request_reviews when repository is missing#667
Thayorns wants to merge 2 commits into
zerocracy:masterfrom
Thayorns:657

Conversation

@Thayorns

@Thayorns Thayorns commented Sep 2, 2026

Copy link
Copy Markdown

pull_request_reviews mapped over result['repository'] without checking whether the key was present, so a missing repository surfaced as undefined method 'map' for nil several frames away from the owner and name that caused it.

Its twin pull_requests_with_reviews already guards the same shape and raises a named Fbe::Error, and total_commits_pushed picked up the same guard in #675. This copies it once more so all three answer the same way when the repository cannot be resolved.

Three tests drive it: a response carrying only errors, a response carrying repository: null, and a response carrying an empty repository object, which is the case that must keep returning an empty list rather than raising. The second one builds its owner from a seed so a failure names the value it ran on.

Closes #657

…ository is missing

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B6v8tZqHAFpr3qBg8bLL8X
@Thayorns

Thayorns commented Sep 2, 2026

Copy link
Copy Markdown
Author

@yegor256 please take a look, happy to clarify anything.

yegor256 commented Sep 3, 2026

Copy link
Copy Markdown
Member

This PR now has merge conflicts and needs a rebase before it can go in. Assigning to @yegor256 for a look.


Generated by Claude Code

@Thayorns Thayorns changed the title raise Fbe::Error in pull_request_reviews when repository is missing Raise Fbe::Error in pull_request_reviews when repository is missing Sep 3, 2026
@Thayorns

Thayorns commented Sep 3, 2026

Copy link
Copy Markdown
Author

@yegor256 take a look please

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pull_request_reviews raises NoMethodError when the repository is missing in lib/fbe/github_graph.rb

2 participants