-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Suspended Installation Properties to GHAppInstallation
A suspended app installation has suspended_at and suspended_by properties that were missing from the GHAppInstallation class.
- Loading branch information
Showing
6 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...ke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/__files/1-app.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"id": 83009, | ||
"slug": "cleanthat", | ||
"node_id": "MDM6QXBwNjU1NTA=", | ||
"owner": { | ||
"login": "solven-eu", | ||
"id": 34552197, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjM0NTUyMTk3", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/34552197?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/solven-eu", | ||
"html_url": "https://github.com/solven-eu", | ||
"followers_url": "https://api.github.com/users/solven-eu/followers", | ||
"following_url": "https://api.github.com/users/solven-eu/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/solven-eu/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/solven-eu/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/solven-eu/subscriptions", | ||
"organizations_url": "https://api.github.com/users/solven-eu/orgs", | ||
"repos_url": "https://api.github.com/users/solven-eu/repos", | ||
"events_url": "https://api.github.com/users/solven-eu/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/solven-eu/received_events", | ||
"type": "Organization", | ||
"site_admin": false | ||
}, | ||
"name": "CleanThat", | ||
"description": "Cleanthat cleans branches automatically to fix/improve your code.\r\n\r\nFeatures :\r\n- Fix branches a pull_requests head\r\n- Open pull_request to fix protected branches\r\n- Format `.md`, `.java`, `.scala`, `.json`, `.yaml` with the help of [Spotless](https://github.com/diffplug/spotless)\r\n- Refactor `.java` files to improve code-style, security and stability", | ||
"external_url": "https://github.com/solven-eu/cleanthat", | ||
"html_url": "https://github.com/apps/cleanthat", | ||
"created_at": "2020-05-19T13:45:43Z", | ||
"updated_at": "2023-01-27T06:10:21Z", | ||
"permissions": { | ||
"checks": "write", | ||
"contents": "write", | ||
"metadata": "read", | ||
"pull_requests": "write" | ||
}, | ||
"events": [ | ||
"pull_request", | ||
"push" | ||
], | ||
"installations_count": 280 | ||
} |
61 changes: 61 additions & 0 deletions
61
...pInstallationTest/wiremock/testListSuspendedInstallation/__files/2-app_installations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[ | ||
{ | ||
"id": 12131496, | ||
"account": { | ||
"login": "hub4j-test-org", | ||
"id": 7544739, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/hub4j-test-org", | ||
"html_url": "https://github.com/hub4j-test-org", | ||
"followers_url": "https://api.github.com/users/hub4j-test-org/followers", | ||
"following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", | ||
"organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", | ||
"repos_url": "https://api.github.com/users/hub4j-test-org/repos", | ||
"events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", | ||
"type": "Organization", | ||
"site_admin": false | ||
}, | ||
"repository_selection": "selected", | ||
"access_tokens_url": "https://api.github.com/app/installations/12131496/access_tokens", | ||
"repositories_url": "https://api.github.com/installation/repositories", | ||
"html_url": "https://github.com/organizations/hub4j-test-org/settings/installations/12131496", | ||
"app_id": 83009, | ||
"app_slug": "ghapi-test-app-2", | ||
"target_id": 7544739, | ||
"target_type": "Organization", | ||
"permissions": {}, | ||
"events": [], | ||
"created_at": "2020-09-30T15:05:32.000Z", | ||
"updated_at": "2020-09-30T15:05:32.000Z", | ||
"single_file_name": null, | ||
"has_multiple_single_files": false, | ||
"single_file_paths": [], | ||
"suspended_by": { | ||
"login": "gilday", | ||
"id": 1431609, | ||
"node_id": "MDQ6VXNlcjE0MzE2MDk=", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/1431609?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/gilday", | ||
"html_url": "https://github.com/gilday", | ||
"followers_url": "https://api.github.com/users/gilday/followers", | ||
"following_url": "https://api.github.com/users/gilday/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/gilday/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/gilday/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/gilday/subscriptions", | ||
"organizations_url": "https://api.github.com/users/gilday/orgs", | ||
"repos_url": "https://api.github.com/users/gilday/repos", | ||
"events_url": "https://api.github.com/users/gilday/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/gilday/received_events", | ||
"type": "User", | ||
"site_admin": false | ||
}, | ||
"suspended_at": "2024-02-26T02:43:12Z" | ||
} | ||
] |
42 changes: 42 additions & 0 deletions
42
...e/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/mappings/1-app.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"id": "144fdb7f-667e-4cf4-bd37-67ed11bdc421", | ||
"name": "app", | ||
"request": { | ||
"url": "/app", | ||
"method": "GET", | ||
"headers": { | ||
"Accept": { | ||
"equalTo": "application/vnd.github.machine-man-preview+json" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "1-app.json", | ||
"headers": { | ||
"Server": "GitHub.com", | ||
"Date": "Sun, 19 Mar 2023 13:02:50 GMT", | ||
"Content-Type": "application/json; charset=utf-8", | ||
"Cache-Control": "public, max-age=60, s-maxage=60", | ||
"Vary": [ | ||
"Accept", | ||
"Accept-Encoding, Accept, X-Requested-With" | ||
], | ||
"ETag": "W/\"00fa67d861eb73a934cd9229b76c2dc7c2c235babf8d281e2dd4a1e31ca3b930\"", | ||
"X-GitHub-Media-Type": "github.v3; param=machine-man-preview; format=json", | ||
"x-github-api-version-selected": "2022-11-28", | ||
"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", | ||
"Access-Control-Allow-Origin": "*", | ||
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", | ||
"X-Frame-Options": "deny", | ||
"X-Content-Type-Options": "nosniff", | ||
"X-XSS-Protection": "0", | ||
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", | ||
"Content-Security-Policy": "default-src 'none'", | ||
"X-GitHub-Request-Id": "C09A:5A83:172C70C:179D1FD:641707FA" | ||
} | ||
}, | ||
"uuid": "144fdb7f-667e-4cf4-bd37-67ed11bdc421", | ||
"persistent": true, | ||
"insertionIndex": 1 | ||
} |
41 changes: 41 additions & 0 deletions
41
...InstallationTest/wiremock/testListSuspendedInstallation/mappings/2-app_installations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"id": "45ac2593-8123-49ae-ad1a-ded446491b14", | ||
"name": "app_installations", | ||
"request": { | ||
"url": "/app/installations", | ||
"method": "GET", | ||
"headers": { | ||
"Accept": { | ||
"equalTo": "application/vnd.github.machine-man-preview+json" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "2-app_installations.json", | ||
"headers": { | ||
"Date": "Thu, 05 Nov 2020 20:42:31 GMT", | ||
"Content-Type": "application/json; charset=utf-8", | ||
"Server": "GitHub.com", | ||
"Status": "200 OK", | ||
"Cache-Control": "public, max-age=60, s-maxage=60", | ||
"Vary": [ | ||
"Accept", | ||
"Accept-Encoding, Accept, X-Requested-With", | ||
"Accept-Encoding" | ||
], | ||
"ETag": "W/\"60d3ec5c9014799f5e12b88e16e771a386b905ad8d41cd18aed34e58b11c58d4\"", | ||
"X-GitHub-Media-Type": "github.v3; param=machine-man-preview; format=json", | ||
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", | ||
"X-Frame-Options": "deny", | ||
"X-Content-Type-Options": "nosniff", | ||
"X-XSS-Protection": "1; mode=block", | ||
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", | ||
"Content-Security-Policy": "default-src 'none'", | ||
"X-GitHub-Request-Id": "9294:AE05:BDAC831:DB35870:5FA463B7" | ||
} | ||
}, | ||
"uuid": "45ac2593-8123-49ae-ad1a-ded446491b14", | ||
"persistent": true, | ||
"insertionIndex": 2 | ||
} |