diff --git a/mock_states/status.state_hide_success_test.json b/mock_states/status.state_hide_success_test.json index 6d188219..c69f9f89 100644 --- a/mock_states/status.state_hide_success_test.json +++ b/mock_states/status.state_hide_success_test.json @@ -6,6 +6,12 @@ }, "buildkite/notabot-test": { "master": "success" + }, + "buildkite/notabot-test/build-infra": { + "master": "success" + }, + "buildkite/notabot-test/setup": { + "master": "success" } } } \ No newline at end of file diff --git a/test/github-api-cache/0d95302addd66c1816bce1b1d495ed1c93ccd478-statuses b/test/github-api-cache/0d95302addd66c1816bce1b1d495ed1c93ccd478-statuses new file mode 100644 index 00000000..7b5efdad --- /dev/null +++ b/test/github-api-cache/0d95302addd66c1816bce1b1d495ed1c93ccd478-statuses @@ -0,0 +1,514 @@ +[ + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1447704, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDQ3NzA0", + "state": "success", + "description": "Build #3 passed (12 seconds)", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/3", + "context": "buildkite/notabot-test", + "created_at": "2020-06-04T05:55:59Z", + "updated_at": "2020-06-04T05:55:59Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1447703, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDQ3NzAz", + "state": "success", + "description": "Passed (1 second)", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/3#1e0475c9-d929-4a2d-876f-f49320780a7c", + "context": "buildkite/notabot-test/build-infra", + "created_at": "2020-06-04T05:55:59Z", + "updated_at": "2020-06-04T05:55:59Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1447702, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDQ3NzAy", + "state": "pending", + "description": "Started...", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/3#1e0475c9-d929-4a2d-876f-f49320780a7c", + "context": "buildkite/notabot-test/build-infra", + "created_at": "2020-06-04T05:55:58Z", + "updated_at": "2020-06-04T05:55:58Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1447701, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDQ3NzAx", + "state": "success", + "description": "Passed (2 seconds)", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/3#730a58fe-1461-4166-9482-b0aa3e001eeb", + "context": "buildkite/notabot-test/setup", + "created_at": "2020-06-04T05:55:50Z", + "updated_at": "2020-06-04T05:55:50Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1447700, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDQ3NzAw", + "state": "pending", + "description": "Build #3 started", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/3", + "context": "buildkite/notabot-test", + "created_at": "2020-06-04T05:55:48Z", + "updated_at": "2020-06-04T05:55:48Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1447699, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDQ3Njk5", + "state": "pending", + "description": "Started...", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/3#730a58fe-1461-4166-9482-b0aa3e001eeb", + "context": "buildkite/notabot-test/setup", + "created_at": "2020-06-04T05:55:48Z", + "updated_at": "2020-06-04T05:55:48Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1447698, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDQ3Njk4", + "state": "pending", + "description": "Build #3 scheduled", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/3", + "context": "buildkite/notabot-test", + "created_at": "2020-06-04T05:55:43Z", + "updated_at": "2020-06-04T05:55:43Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437427, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDI3", + "state": "success", + "description": "Build #2 passed (5 minutes, 19 seconds)", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2", + "context": "buildkite/notabot-test", + "created_at": "2020-06-02T03:21:39Z", + "updated_at": "2020-06-02T03:21:39Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437426, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDI2", + "state": "success", + "description": "Passed (1 minute, 3 seconds)", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2#60dd9ae8-4a30-4cf0-be32-26e0eb699ea2", + "context": "buildkite/notabot-test/build-infra", + "created_at": "2020-06-02T03:21:39Z", + "updated_at": "2020-06-02T03:21:39Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437425, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDI1", + "state": "pending", + "description": "Started...", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2#60dd9ae8-4a30-4cf0-be32-26e0eb699ea2", + "context": "buildkite/notabot-test/build-infra", + "created_at": "2020-06-02T03:20:35Z", + "updated_at": "2020-06-02T03:20:35Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437421, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDIx", + "state": "success", + "description": "Passed (59 seconds)", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2#55d6fe69-bb6b-49cf-85a5-4b4f7baee671", + "context": "buildkite/notabot-test/setup", + "created_at": "2020-06-02T03:19:46Z", + "updated_at": "2020-06-02T03:19:46Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437414, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDE0", + "state": "pending", + "description": "Started...", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2#55d6fe69-bb6b-49cf-85a5-4b4f7baee671", + "context": "buildkite/notabot-test/setup", + "created_at": "2020-06-02T03:18:47Z", + "updated_at": "2020-06-02T03:18:47Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437407, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDA3", + "state": "pending", + "description": "Build #2 started", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2", + "context": "buildkite/notabot-test", + "created_at": "2020-06-02T03:16:39Z", + "updated_at": "2020-06-02T03:16:39Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437404, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDA0", + "state": "failure", + "description": "Build #2 failed (20 seconds)", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2", + "context": "buildkite/notabot-test", + "created_at": "2020-06-02T03:15:46Z", + "updated_at": "2020-06-02T03:15:46Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437403, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDAz", + "state": "pending", + "description": "Build #2 started", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2", + "context": "buildkite/notabot-test", + "created_at": "2020-06-02T03:15:36Z", + "updated_at": "2020-06-02T03:15:36Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + }, + { + "url": "https://git.ahrefs.com/api/v3/repos/ahrefs/notabot_test/statuses/0d95302addd66c1816bce1b1d495ed1c93ccd478", + "avatar_url": "https://git.ahrefs.com/avatars/oa/6?", + "id": 1437402, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQxNDM3NDAy", + "state": "pending", + "description": "Build #2 scheduled", + "target_url": "https://buildkite.com/ahrefs/notabot-test/builds/2", + "context": "buildkite/notabot-test", + "created_at": "2020-06-02T03:14:53Z", + "updated_at": "2020-06-02T03:14:53Z", + "creator": { + "login": "ip", + "id": 3, + "node_id": "MDQ6VXNlcjM=", + "avatar_url": "https://git.ahrefs.com/avatars/u/3?", + "gravatar_id": "", + "url": "https://git.ahrefs.com/api/v3/users/ip", + "html_url": "https://git.ahrefs.com/ip", + "followers_url": "https://git.ahrefs.com/api/v3/users/ip/followers", + "following_url": "https://git.ahrefs.com/api/v3/users/ip/following{/other_user}", + "gists_url": "https://git.ahrefs.com/api/v3/users/ip/gists{/gist_id}", + "starred_url": "https://git.ahrefs.com/api/v3/users/ip/starred{/owner}{/repo}", + "subscriptions_url": "https://git.ahrefs.com/api/v3/users/ip/subscriptions", + "organizations_url": "https://git.ahrefs.com/api/v3/users/ip/orgs", + "repos_url": "https://git.ahrefs.com/api/v3/users/ip/repos", + "events_url": "https://git.ahrefs.com/api/v3/users/ip/events{/privacy}", + "received_events_url": "https://git.ahrefs.com/api/v3/users/ip/received_events", + "type": "User", + "site_admin": true + } + } +] \ No newline at end of file diff --git a/test/github-api-cache/6113728f27ae82c7b1a177c8d03f9e96e0adf246-statuses b/test/github-api-cache/6113728f27ae82c7b1a177c8d03f9e96e0adf246-statuses new file mode 100644 index 00000000..1729d364 --- /dev/null +++ b/test/github-api-cache/6113728f27ae82c7b1a177c8d03f9e96e0adf246-statuses @@ -0,0 +1,34 @@ +[ + { + "url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/6113728f27ae82c7b1a177c8d03f9e96e0adf246", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "id": 6805126730, + "node_id": "MDEzOlN0YXR1c0NvbnRleHQ2ODA1MTI2NzMw", + "state": "success", + "description": null, + "target_url": null, + "context": "default", + "created_at": "2019-05-15T15:20:55Z", + "updated_at": "2019-05-15T15:20:55Z", + "creator": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + } + } +] \ No newline at end of file diff --git a/test/test.ml b/test/test.ml index 008f74e7..d629f6da 100644 --- a/test/test.ml +++ b/test/test.ml @@ -20,6 +20,7 @@ let get_mock_payloads () = if Caml.Sys.file_exists state_path then kind, payload_path, Some state_path else kind, payload_path, None) let process ~(ctx : Context.t) (kind, path, state_path) = + ctx.state.pipeline_statuses <- Common.StringMap.empty; let%lwt ctx = match state_path with | None -> Lwt.return ctx