Skip to content

Commit b74126c

Browse files
committed
chore: replace custom org with officially supported hub4j-test-org
1 parent 24105f7 commit b74126c

File tree

8 files changed

+119
-119
lines changed

8 files changed

+119
-119
lines changed

src/test/java/org/kohsuke/github/GHOrganizationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,15 @@ public void testInviteUser() throws IOException {
251251
*/
252252
@Test
253253
public void testGetMembership() throws IOException {
254-
GHOrganization org = gitHub.getOrganization("mock-organisation");
254+
GHOrganization org = gitHub.getOrganization("hub4j-test-org");
255255

256256
GHMembership membership = org.getMembership("fv316");
257257

258258
assertThat(membership, notNullValue());
259259
assertThat(membership.getRole(), equalTo(GHMembership.Role.ADMIN));
260260
assertThat(membership.getState(), equalTo(GHMembership.State.ACTIVE));
261261
assertThat(membership.getUser().getLogin(), equalTo("fv316"));
262-
assertThat(membership.getOrganization().login, equalTo("mock-organisation"));
262+
assertThat(membership.getOrganization().login, equalTo("hub4j-test-org"));
263263
}
264264

265265
/**

src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testGetMembership/__files/1-user.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
"hireable": null,
2626
"bio": "Software developer at Teya. Electrical Engineer @ Imperial College. Data scientist @ École Polytechnique",
2727
"twitter_username": null,
28-
"public_repos": 28,
28+
"public_repos": 29,
2929
"public_gists": 0,
3030
"followers": 6,
3131
"following": 5,
3232
"created_at": "2017-11-28T18:40:02Z",
33-
"updated_at": "2024-06-05T12:59:50Z"
33+
"updated_at": "2024-06-10T08:34:28Z"
3434
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"login": "hub4j-test-org",
3+
"id": 7544739,
4+
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
5+
"url": "https://api.github.com/orgs/hub4j-test-org",
6+
"repos_url": "https://api.github.com/orgs/hub4j-test-org/repos",
7+
"events_url": "https://api.github.com/orgs/hub4j-test-org/events",
8+
"hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks",
9+
"issues_url": "https://api.github.com/orgs/hub4j-test-org/issues",
10+
"members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}",
11+
"public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}",
12+
"avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4",
13+
"description": "Hub4j Test Org Description (this could be null or blank too)",
14+
"name": "Hub4j Test Org Name (this could be null or blank too)",
15+
"company": null,
16+
"blog": "https://hub4j.url.io/could/be/null",
17+
"location": "Hub4j Test Org Location (this could be null or blank too)",
18+
"email": "hub4jtestorgemail@could.be.null.com",
19+
"twitter_username": null,
20+
"is_verified": false,
21+
"has_organization_projects": true,
22+
"has_repository_projects": true,
23+
"public_repos": 27,
24+
"public_gists": 0,
25+
"followers": 2,
26+
"following": 0,
27+
"html_url": "https://github.com/hub4j-test-org",
28+
"created_at": "2014-05-10T19:39:11Z",
29+
"updated_at": "2020-06-04T05:56:10Z",
30+
"archived_at": null,
31+
"type": "Organization",
32+
"total_private_repos": 6,
33+
"owned_private_repos": 6,
34+
"private_gists": 0,
35+
"disk_usage": 12014,
36+
"collaborators": 1,
37+
"billing_email": "kk@kohsuke.org",
38+
"default_repository_permission": "none",
39+
"members_can_create_repositories": false,
40+
"two_factor_requirement_enabled": false,
41+
"members_allowed_repository_creation_type": "none",
42+
"members_can_create_public_repositories": false,
43+
"members_can_create_private_repositories": false,
44+
"members_can_create_internal_repositories": false,
45+
"members_can_create_pages": true,
46+
"members_can_fork_private_repositories": false,
47+
"web_commit_signoff_required": false,
48+
"members_can_create_public_pages": true,
49+
"members_can_create_private_pages": true,
50+
"plan": {
51+
"name": "free",
52+
"space": 976562499,
53+
"private_repos": 10000,
54+
"filled_seats": 52,
55+
"seats": 3
56+
},
57+
"advanced_security_enabled_for_new_repositories": false,
58+
"dependabot_alerts_enabled_for_new_repositories": false,
59+
"dependabot_security_updates_enabled_for_new_repositories": false,
60+
"dependency_graph_enabled_for_new_repositories": false,
61+
"secret_scanning_enabled_for_new_repositories": false,
62+
"secret_scanning_push_protection_enabled_for_new_repositories": false,
63+
"secret_scanning_push_protection_custom_link_enabled": false,
64+
"secret_scanning_push_protection_custom_link": null,
65+
"secret_scanning_validity_checks_enabled": false
66+
}

src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testGetMembership/__files/2-orgs_mock-organisation.json

Lines changed: 0 additions & 66 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"url": "https://api.github.com/orgs/mock-organisation/memberships/fv316",
2+
"url": "https://api.github.com/orgs/hub4j-test-org/memberships/fv316",
33
"state": "active",
44
"role": "admin",
5-
"organization_url": "https://api.github.com/orgs/mock-organisation",
5+
"organization_url": "https://api.github.com/orgs/hub4j-test-org",
66
"user": {
77
"login": "fv316",
88
"id": 34072742,
@@ -24,17 +24,17 @@
2424
"site_admin": false
2525
},
2626
"organization": {
27-
"login": "mock-organisation",
28-
"id": 171699586,
29-
"node_id": "O_kgDOCjvtgg",
30-
"url": "https://api.github.com/orgs/mock-organisation",
31-
"repos_url": "https://api.github.com/orgs/mock-organisation/repos",
32-
"events_url": "https://api.github.com/orgs/mock-organisation/events",
33-
"hooks_url": "https://api.github.com/orgs/mock-organisation/hooks",
34-
"issues_url": "https://api.github.com/orgs/mock-organisation/issues",
35-
"members_url": "https://api.github.com/orgs/mock-organisation/members{/member}",
36-
"public_members_url": "https://api.github.com/orgs/mock-organisation/public_members{/member}",
37-
"avatar_url": "https://avatars.githubusercontent.com/u/171699586?v=4",
38-
"description": null
27+
"login": "hub4j-test-org",
28+
"id": 7544739,
29+
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
30+
"url": "https://api.github.com/orgs/hub4j-test-org",
31+
"repos_url": "https://api.github.com/orgs/hub4j-test-org/repos",
32+
"events_url": "https://api.github.com/orgs/hub4j-test-org/events",
33+
"hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks",
34+
"issues_url": "https://api.github.com/orgs/hub4j-test-org/issues",
35+
"members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}",
36+
"public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}",
37+
"avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4",
38+
"description": "Hub4j Test Org Description (this could be null or blank too)"
3939
}
4040
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "9983abe7-ee83-40fb-9f7d-8b25b979c8dd",
2+
"id": "78c86a2e-48b0-4b78-a9c8-c409b4cc58e3",
33
"name": "user",
44
"request": {
55
"url": "/user",
@@ -15,23 +15,23 @@
1515
"bodyFileName": "1-user.json",
1616
"headers": {
1717
"Server": "GitHub.com",
18-
"Date": "Thu, 06 Jun 2024 15:38:49 GMT",
18+
"Date": "Mon, 10 Jun 2024 09:07:17 GMT",
1919
"Content-Type": "application/json; charset=utf-8",
2020
"Cache-Control": "private, max-age=60, s-maxage=60",
2121
"Vary": [
2222
"Accept, Authorization, Cookie, X-GitHub-OTP",
2323
"Accept-Encoding, Accept, X-Requested-With"
2424
],
25-
"ETag": "W/\"cc47b0608e8170439c172bb015abe17c1576806969dcb252ee43f686f15345f7\"",
26-
"Last-Modified": "Wed, 05 Jun 2024 12:59:50 GMT",
27-
"github-authentication-token-expiration": "2024-06-13 16:25:54 +0100",
25+
"ETag": "W/\"eeffd28da9e86bf9a8b2cf03b36620ad72f1bccfccd1a5ee0a51a95dab4e05e9\"",
26+
"Last-Modified": "Mon, 10 Jun 2024 08:34:28 GMT",
27+
"github-authentication-token-expiration": "2024-06-17 10:06:09 +0100",
2828
"X-GitHub-Media-Type": "github.v3; format=json",
2929
"x-accepted-github-permissions": "allows_permissionless_access=true",
3030
"x-github-api-version-selected": "2022-11-28",
3131
"X-RateLimit-Limit": "5000",
32-
"X-RateLimit-Remaining": "4844",
33-
"X-RateLimit-Reset": "1717690187",
34-
"X-RateLimit-Used": "156",
32+
"X-RateLimit-Remaining": "4982",
33+
"X-RateLimit-Reset": "1718013850",
34+
"X-RateLimit-Used": "18",
3535
"X-RateLimit-Resource": "core",
3636
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
3737
"Access-Control-Allow-Origin": "*",
@@ -41,10 +41,10 @@
4141
"X-XSS-Protection": "0",
4242
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
4343
"Content-Security-Policy": "default-src 'none'",
44-
"X-GitHub-Request-Id": "1A65:181293:B94C8:C2871:6661D808"
44+
"X-GitHub-Request-Id": "914E:19FF74:39926C:39E38C:6666C245"
4545
}
4646
},
47-
"uuid": "9983abe7-ee83-40fb-9f7d-8b25b979c8dd",
47+
"uuid": "78c86a2e-48b0-4b78-a9c8-c409b4cc58e3",
4848
"persistent": true,
4949
"insertionIndex": 1
5050
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"id": "62797463-a232-414c-b61b-4f7f26b11623",
3-
"name": "orgs_mock-organisation",
2+
"id": "9f6e328b-67ee-4481-8bcc-8b33b990dbd2",
3+
"name": "orgs_hub4j-test-org",
44
"request": {
5-
"url": "/orgs/mock-organisation",
5+
"url": "/orgs/hub4j-test-org",
66
"method": "GET",
77
"headers": {
88
"Accept": {
@@ -12,26 +12,26 @@
1212
},
1313
"response": {
1414
"status": 200,
15-
"bodyFileName": "2-orgs_mock-organisation.json",
15+
"bodyFileName": "2-orgs_hub4j-test-org.json",
1616
"headers": {
1717
"Server": "GitHub.com",
18-
"Date": "Thu, 06 Jun 2024 15:38:51 GMT",
18+
"Date": "Mon, 10 Jun 2024 09:07:19 GMT",
1919
"Content-Type": "application/json; charset=utf-8",
2020
"Cache-Control": "private, max-age=60, s-maxage=60",
2121
"Vary": [
2222
"Accept, Authorization, Cookie, X-GitHub-OTP",
2323
"Accept-Encoding, Accept, X-Requested-With"
2424
],
25-
"ETag": "W/\"a8ccf6ca746ccbd535bcb3f10ecb249a074eef79dc975e1d5db41182f8ce2e54\"",
26-
"Last-Modified": "Tue, 04 Jun 2024 13:37:26 GMT",
27-
"github-authentication-token-expiration": "2024-06-13 16:25:54 +0100",
25+
"ETag": "W/\"67969e1a2c33b92087f1e2d76d07a944a80920a84bf07593fff4ec8c8d00f612\"",
26+
"Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT",
27+
"github-authentication-token-expiration": "2024-06-17 10:06:09 +0100",
2828
"X-GitHub-Media-Type": "github.v3; format=json",
2929
"x-accepted-github-permissions": "allows_permissionless_access=true",
3030
"x-github-api-version-selected": "2022-11-28",
3131
"X-RateLimit-Limit": "5000",
32-
"X-RateLimit-Remaining": "4839",
33-
"X-RateLimit-Reset": "1717690187",
34-
"X-RateLimit-Used": "161",
32+
"X-RateLimit-Remaining": "4977",
33+
"X-RateLimit-Reset": "1718013850",
34+
"X-RateLimit-Used": "23",
3535
"X-RateLimit-Resource": "core",
3636
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
3737
"Access-Control-Allow-Origin": "*",
@@ -41,10 +41,10 @@
4141
"X-XSS-Protection": "0",
4242
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
4343
"Content-Security-Policy": "default-src 'none'",
44-
"X-GitHub-Request-Id": "F2AA:31C67E:2E42EBC:30B5BBC:6661D80A"
44+
"X-GitHub-Request-Id": "56D5:19B6F6:69C4020:6A85446:6666C247"
4545
}
4646
},
47-
"uuid": "62797463-a232-414c-b61b-4f7f26b11623",
47+
"uuid": "9f6e328b-67ee-4481-8bcc-8b33b990dbd2",
4848
"persistent": true,
4949
"insertionIndex": 2
5050
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"id": "cd3ae3f9-47a8-4d17-8f41-16f18b0e5607",
3-
"name": "orgs_mock-organisation_memberships_fv316",
2+
"id": "43da17f8-ad32-4962-8514-6c6cc43c15cc",
3+
"name": "orgs_hub4j-test-org_memberships_fv316",
44
"request": {
5-
"url": "/orgs/mock-organisation/memberships/fv316",
5+
"url": "/orgs/hub4j-test-org/memberships/fv316",
66
"method": "GET",
77
"headers": {
88
"Accept": {
@@ -12,25 +12,25 @@
1212
},
1313
"response": {
1414
"status": 200,
15-
"bodyFileName": "3-o_m_m_fv316.json",
15+
"bodyFileName": "3-o_h_m_fv316.json",
1616
"headers": {
1717
"Server": "GitHub.com",
18-
"Date": "Thu, 06 Jun 2024 15:38:51 GMT",
18+
"Date": "Mon, 10 Jun 2024 09:07:20 GMT",
1919
"Content-Type": "application/json; charset=utf-8",
2020
"Cache-Control": "private, max-age=60, s-maxage=60",
2121
"Vary": [
2222
"Accept, Authorization, Cookie, X-GitHub-OTP",
2323
"Accept-Encoding, Accept, X-Requested-With"
2424
],
25-
"ETag": "W/\"d9663a5538f0cd0a09014e4587127f36e837fae231bf3aeca7c86a57f033e250\"",
26-
"github-authentication-token-expiration": "2024-06-13 16:25:54 +0100",
25+
"ETag": "W/\"15242c0357eae1a2005c74dbd71674ea7381c0aa015e9ed363fbda6e21f04e9e\"",
26+
"github-authentication-token-expiration": "2024-06-17 10:06:09 +0100",
2727
"X-GitHub-Media-Type": "github.v3; format=json",
2828
"x-accepted-github-permissions": "members=read",
2929
"x-github-api-version-selected": "2022-11-28",
3030
"X-RateLimit-Limit": "5000",
31-
"X-RateLimit-Remaining": "4838",
32-
"X-RateLimit-Reset": "1717690187",
33-
"X-RateLimit-Used": "162",
31+
"X-RateLimit-Remaining": "4976",
32+
"X-RateLimit-Reset": "1718013850",
33+
"X-RateLimit-Used": "24",
3434
"X-RateLimit-Resource": "core",
3535
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
3636
"Access-Control-Allow-Origin": "*",
@@ -40,10 +40,10 @@
4040
"X-XSS-Protection": "0",
4141
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
4242
"Content-Security-Policy": "default-src 'none'",
43-
"X-GitHub-Request-Id": "B4D6:3283A7:2BC7A3D:2E26C30:6661D80B"
43+
"X-GitHub-Request-Id": "9122:E812C:6E243E4:6EE4810:6666C248"
4444
}
4545
},
46-
"uuid": "cd3ae3f9-47a8-4d17-8f41-16f18b0e5607",
46+
"uuid": "43da17f8-ad32-4962-8514-6c6cc43c15cc",
4747
"persistent": true,
4848
"insertionIndex": 3
4949
}

0 commit comments

Comments
 (0)