Skip to content

Build owner, html_url and url of the fake repository from its resolved name - #1473

Open
Thayorns wants to merge 1 commit into
zerocracy:masterfrom
Thayorns:693
Open

Thayorns wants to merge 1 commit into
zerocracy:masterfrom
Thayorns:693

Conversation

@Thayorns

Copy link
Copy Markdown
Contributor

Fbe::FakeOctokit#repository takes a name or a numeric id, and resolves the id to a full_name. It then built owner, html_url and url from the raw argument, not the resolved name. So repository(1439) claimed full_name: "zerocracy/baza" and owner.login: "1439" in the same hash, with html_url pointing at https://github.com/1439. Separately, url used the HTML host, while GitHub answers with https://api.github.com/repos/<full_name>.

All three now come from the resolved repo, as the issue suggests.

The new tests check, for the id form, that the owner is the one in full_name and that html_url and url are built from full_name. For the name form, a non-ASCII name gets an API url and keeps its owner.

Closes #693

@Thayorns

Copy link
Copy Markdown
Contributor Author

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

@Thayorns Thayorns closed this Oct 12, 2026
@Thayorns Thayorns reopened this Oct 12, 2026
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.

Fake client's repository(id) builds owner and html_url from the id, contradicting its own full_name

1 participant