With testing: true, the fake pull request response does not expose the nested base repository values through the lookup used by the Octokit-facing code. A caller gets nil instead of the repository name and id, which can make tests or judges treat a pull request as belonging to no repository.
Steps to reproduce
- Enable Fbe testing mode and request a fake pull request, for example
o.pull_request("zerocracy/baza", 42).
- Read
pr.dig(:base, :repo, :full_name) and pr.dig(:base, :repo, :id).
Actual result
The lookup returns nil instead of the base repository values. test_fake_pull_request_base_repo_matches_requested_repo currently fails with expected "zerocracy/baza", actual nil.
Expected result
The fake response should preserve the nested base repository fields so the lookup returns the requested repository name and its integer id, matching the response shape consumed from Octokit.
Technical evidence
lib/fbe/fake_octokit.rb constructs the pull request response with base: { repo: repository(repo) }. PR #786 changed fake responses from hashes to Sawyer::Resource answers through lib/fbe/fake_octokit/sawyered.rb. The exact nested lookup fails in both Ubuntu and macOS rake jobs for PR #793 (run 36355562715).
With
testing: true, the fake pull request response does not expose the nested base repository values through the lookup used by the Octokit-facing code. A caller getsnilinstead of the repository name and id, which can make tests or judges treat a pull request as belonging to no repository.Steps to reproduce
o.pull_request("zerocracy/baza", 42).pr.dig(:base, :repo, :full_name)andpr.dig(:base, :repo, :id).Actual result
The lookup returns
nilinstead of the base repository values.test_fake_pull_request_base_repo_matches_requested_repocurrently fails with expected"zerocracy/baza", actualnil.Expected result
The fake response should preserve the nested base repository fields so the lookup returns the requested repository name and its integer id, matching the response shape consumed from Octokit.
Technical evidence
lib/fbe/fake_octokit.rbconstructs the pull request response withbase: { repo: repository(repo) }. PR #786 changed fake responses from hashes toSawyer::Resourceanswers throughlib/fbe/fake_octokit/sawyered.rb. The exact nested lookup fails in both Ubuntu and macOSrakejobs for PR #793 (run 36355562715).