Skip to content

Commit

Permalink
Adds GHRepository#getTemplateRepository test
Browse files Browse the repository at this point in the history
  • Loading branch information
robinvandenbogaard committed Dec 15, 2022
1 parent ba177e6 commit c431627
Show file tree
Hide file tree
Showing 5 changed files with 504 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/java/org/kohsuke/github/GHRepositoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1538,4 +1538,11 @@ public void createSecret() throws Exception {
GHRepository repo = getTempRepository();
repo.createSecret("secret", "encrypted", "public");
}

@Test
public void templateRepository() throws Exception {
GHRepository repo = getRepository();

assertThat(repo.getTemplateRepository().getName(), is("github-api-template"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"login": "hub4j-test-org",
"id": 7544739,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
"url": "https://api.github.com/orgs/hub4j-test-org",
"repos_url": "https://api.github.com/orgs/hub4j-test-org/repos",
"events_url": "https://api.github.com/orgs/hub4j-test-org/events",
"hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks",
"issues_url": "https://api.github.com/orgs/hub4j-test-org/issues",
"members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}",
"public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}",
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
"description": null,
"is_verified": false,
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 9,
"public_gists": 0,
"followers": 0,
"following": 0,
"html_url": "https://github.com/hub4j-test-org",
"created_at": "2014-05-10T19:39:11Z",
"updated_at": "2015-04-20T00:42:30Z",
"type": "Organization",
"total_private_repos": 0,
"owned_private_repos": 0,
"private_gists": 0,
"disk_usage": 132,
"collaborators": 0,
"billing_email": "[email protected]",
"default_repository_permission": "none",
"members_can_create_repositories": false,
"two_factor_requirement_enabled": false,
"members_allowed_repository_creation_type": "none",
"plan": {
"name": "free",
"space": 976562499,
"private_repos": 0,
"filled_seats": 3,
"seats": 0
}
}
Loading

0 comments on commit c431627

Please sign in to comment.