Skip to content

Commit ef09a4c

Browse files
committed
extend status tests to cover more edge cases
- `state_hide_success_test` confirms the fix to #91 pipeline differentiation (behavior isn’t affected by presence of branch failure in another pipeline) - `success_test` -> `success_test_non_main_branch` shows that default channel is used if non-main branch build - `success_test_main_branch` shows that prefix rules kick in if main branch build - `state_hide_success_test_disallowed_pipeline` shows that build notifications not in the allow list are ignored
1 parent 0b3854c commit ef09a4c

6 files changed

+478
-1
lines changed
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
{
2+
"id": 0,
3+
"sha": "0d95302addd66c1816bce1b1d495ed1c93ccd478",
4+
"name": "ahrefs/monorepo",
5+
"target_url": "https://buildkite.com/org/pipeline2/builds/2",
6+
"avatar_url": "https://github.com/avatars/oa/0",
7+
"context": "buildkite/pipeline3",
8+
"description": "Build #2 passed (5 minutes, 19 seconds)",
9+
"state": "success",
10+
"commit": {
11+
"sha": "0d95302addd66c1816bce1b1d495ed1c93ccd478",
12+
"node_id": "00000000000000000000",
13+
"commit": {
14+
"author": {
15+
"name": "Louis",
16+
"email": "[email protected]",
17+
"date": "2020-06-02T03:14:51Z"
18+
},
19+
"committer": {
20+
"name": "GitHub Enterprise",
21+
"email": "[email protected]",
22+
"date": "2020-06-02T03:14:51Z"
23+
},
24+
"message": "Update README.md",
25+
"tree": {
26+
"sha": "ee5c539cad37c77348ce7a55756acc542b41cfc7",
27+
"url": "https://github.com/api/v3/repos/ahrefs/monorepo/git/trees/ee5c539cad37c77348ce7a55756acc542b41cfc7"
28+
},
29+
"url": "https://github.com/api/v3/repos/ahrefs/monorepo/git/commits/0d95302addd66c1816bce1b1d495ed1c93ccd478",
30+
"comment_count": 0,
31+
"verification": {
32+
"verified": false,
33+
"reason": "unsigned",
34+
"signature": null,
35+
"payload": null
36+
}
37+
},
38+
"url": "https://github.com/api/v3/repos/ahrefs/monorepo/commits/0d95302addd66c1816bce1b1d495ed1c93ccd478",
39+
"html_url": "https://github.com/ahrefs/monorepo/commit/0d95302addd66c1816bce1b1d495ed1c93ccd478",
40+
"comments_url": "https://github.com/api/v3/repos/ahrefs/monorepo/commits/0d95302addd66c1816bce1b1d495ed1c93ccd478/comments",
41+
"author": {
42+
"login": "Khady",
43+
"id": 0,
44+
"node_id": "00000000000000000000",
45+
"avatar_url": "https://github.com/avatars/u/0",
46+
"gravatar_id": "",
47+
"url": "https://github.com/api/v3/users/Khady",
48+
"html_url": "https://github.com/Khady",
49+
"followers_url": "https://github.com/api/v3/users/Khady/followers",
50+
"following_url": "https://github.com/api/v3/users/Khady/following{/other_user}",
51+
"gists_url": "https://github.com/api/v3/users/Khady/gists{/gist_id}",
52+
"starred_url": "https://github.com/api/v3/users/Khady/starred{/owner}{/repo}",
53+
"subscriptions_url": "https://github.com/api/v3/users/Khady/subscriptions",
54+
"organizations_url": "https://github.com/api/v3/users/Khady/orgs",
55+
"repos_url": "https://github.com/api/v3/users/Khady/repos",
56+
"events_url": "https://github.com/api/v3/users/Khady/events{/privacy}",
57+
"received_events_url": "https://github.com/api/v3/users/Khady/received_events",
58+
"type": "User",
59+
"site_admin": false
60+
},
61+
"committer": null,
62+
"parents": [
63+
{
64+
"sha": "04cb72d6dc8d92131282a7eff57f6caf632f0a39",
65+
"url": "https://github.com/api/v3/repos/ahrefs/monorepo/commits/04cb72d6dc8d92131282a7eff57f6caf632f0a39",
66+
"html_url": "https://github.com/ahrefs/monorepo/commit/04cb72d6dc8d92131282a7eff57f6caf632f0a39"
67+
}
68+
]
69+
},
70+
"branches": [
71+
{
72+
"name": "master",
73+
"commit": {
74+
"sha": "0d95302addd66c1816bce1b1d495ed1c93ccd478",
75+
"url": "https://github.com/api/v3/repos/ahrefs/monorepo/commits/0d95302addd66c1816bce1b1d495ed1c93ccd478"
76+
},
77+
"protected": false
78+
}
79+
],
80+
"created_at": "2020-06-02T03:21:39+00:00",
81+
"updated_at": "2020-06-02T03:21:39+00:00",
82+
"repository": {
83+
"id": 0,
84+
"node_id": "00000000000000000000",
85+
"name": "monorepo",
86+
"full_name": "ahrefs/monorepo",
87+
"private": true,
88+
"owner": {
89+
"login": "ahrefs",
90+
"id": 0,
91+
"node_id": "00000000000000000000",
92+
"avatar_url": "https://github.com/avatars/u/0",
93+
"gravatar_id": "",
94+
"url": "https://github.com/api/v3/users/ahrefs",
95+
"html_url": "https://github.com/ahrefs",
96+
"followers_url": "https://github.com/api/v3/users/ahrefs/followers",
97+
"following_url": "https://github.com/api/v3/users/ahrefs/following{/other_user}",
98+
"gists_url": "https://github.com/api/v3/users/ahrefs/gists{/gist_id}",
99+
"starred_url": "https://github.com/api/v3/users/ahrefs/starred{/owner}{/repo}",
100+
"subscriptions_url": "https://github.com/api/v3/users/ahrefs/subscriptions",
101+
"organizations_url": "https://github.com/api/v3/users/ahrefs/orgs",
102+
"repos_url": "https://github.com/api/v3/users/ahrefs/repos",
103+
"events_url": "https://github.com/api/v3/users/ahrefs/events{/privacy}",
104+
"received_events_url": "https://github.com/api/v3/users/ahrefs/received_events",
105+
"type": "Organization",
106+
"site_admin": false
107+
},
108+
"html_url": "https://github.com/ahrefs/monorepo",
109+
"description": null,
110+
"fork": false,
111+
"url": "https://github.com/api/v3/repos/ahrefs/monorepo",
112+
"forks_url": "https://github.com/api/v3/repos/ahrefs/monorepo/forks",
113+
"keys_url": "https://github.com/api/v3/repos/ahrefs/monorepo/keys{/key_id}",
114+
"collaborators_url": "https://github.com/api/v3/repos/ahrefs/monorepo/collaborators{/collaborator}",
115+
"teams_url": "https://github.com/api/v3/repos/ahrefs/monorepo/teams",
116+
"hooks_url": "https://github.com/api/v3/repos/ahrefs/monorepo/hooks",
117+
"issue_events_url": "https://github.com/api/v3/repos/ahrefs/monorepo/issues/events{/number}",
118+
"events_url": "https://github.com/api/v3/repos/ahrefs/monorepo/events",
119+
"assignees_url": "https://github.com/api/v3/repos/ahrefs/monorepo/assignees{/user}",
120+
"branches_url": "https://github.com/api/v3/repos/ahrefs/monorepo/branches{/branch}",
121+
"tags_url": "https://github.com/api/v3/repos/ahrefs/monorepo/tags",
122+
"blobs_url": "https://github.com/api/v3/repos/ahrefs/monorepo/git/blobs{/sha}",
123+
"git_tags_url": "https://github.com/api/v3/repos/ahrefs/monorepo/git/tags{/sha}",
124+
"git_refs_url": "https://github.com/api/v3/repos/ahrefs/monorepo/git/refs{/sha}",
125+
"trees_url": "https://github.com/api/v3/repos/ahrefs/monorepo/git/trees{/sha}",
126+
"statuses_url": "https://github.com/api/v3/repos/ahrefs/monorepo/statuses/{sha}",
127+
"languages_url": "https://github.com/api/v3/repos/ahrefs/monorepo/languages",
128+
"stargazers_url": "https://github.com/api/v3/repos/ahrefs/monorepo/stargazers",
129+
"contributors_url": "https://github.com/api/v3/repos/ahrefs/monorepo/contributors",
130+
"subscribers_url": "https://github.com/api/v3/repos/ahrefs/monorepo/subscribers",
131+
"subscription_url": "https://github.com/api/v3/repos/ahrefs/monorepo/subscription",
132+
"commits_url": "https://github.com/api/v3/repos/ahrefs/monorepo/commits{/sha}",
133+
"git_commits_url": "https://github.com/api/v3/repos/ahrefs/monorepo/git/commits{/sha}",
134+
"comments_url": "https://github.com/api/v3/repos/ahrefs/monorepo/comments{/number}",
135+
"issue_comment_url": "https://github.com/api/v3/repos/ahrefs/monorepo/issues/comments{/number}",
136+
"contents_url": "https://github.com/api/v3/repos/ahrefs/monorepo/contents/{+path}",
137+
"compare_url": "https://github.com/api/v3/repos/ahrefs/monorepo/compare/{base}...{head}",
138+
"merges_url": "https://github.com/api/v3/repos/ahrefs/monorepo/merges",
139+
"archive_url": "https://github.com/api/v3/repos/ahrefs/monorepo/{archive_format}{/ref}",
140+
"downloads_url": "https://github.com/api/v3/repos/ahrefs/monorepo/downloads",
141+
"issues_url": "https://github.com/api/v3/repos/ahrefs/monorepo/issues{/number}",
142+
"pulls_url": "https://github.com/api/v3/repos/ahrefs/monorepo/pulls{/number}",
143+
"milestones_url": "https://github.com/api/v3/repos/ahrefs/monorepo/milestones{/number}",
144+
"notifications_url": "https://github.com/api/v3/repos/ahrefs/monorepo/notifications{?since,all,participating}",
145+
"labels_url": "https://github.com/api/v3/repos/ahrefs/monorepo/labels{/name}",
146+
"releases_url": "https://github.com/api/v3/repos/ahrefs/monorepo/releases{/id}",
147+
"deployments_url": "https://github.com/api/v3/repos/ahrefs/monorepo/deployments",
148+
"created_at": "2020-06-01T18:44:17Z",
149+
"updated_at": "2020-06-02T03:14:53Z",
150+
"pushed_at": "2020-06-02T03:14:51Z",
151+
"git_url": "git://github.com/ahrefs/monorepo.git",
152+
"ssh_url": "[email protected]:ahrefs/monorepo.git",
153+
"clone_url": "https://github.com/ahrefs/monorepo.git",
154+
"svn_url": "https://github.com/ahrefs/monorepo",
155+
"homepage": null,
156+
"size": 0,
157+
"stargazers_count": 0,
158+
"watchers_count": 0,
159+
"language": "Shell",
160+
"has_issues": true,
161+
"has_projects": false,
162+
"has_downloads": true,
163+
"has_wiki": true,
164+
"has_pages": false,
165+
"forks_count": 0,
166+
"mirror_url": null,
167+
"archived": false,
168+
"disabled": false,
169+
"open_issues_count": 0,
170+
"license": null,
171+
"forks": 0,
172+
"open_issues": 0,
173+
"watchers": 0,
174+
"default_branch": "master"
175+
},
176+
"organization": {
177+
"login": "ahrefs",
178+
"id": 0,
179+
"node_id": "00000000000000000000",
180+
"url": "https://github.com/api/v3/orgs/ahrefs",
181+
"repos_url": "https://github.com/api/v3/orgs/ahrefs/repos",
182+
"events_url": "https://github.com/api/v3/orgs/ahrefs/events",
183+
"hooks_url": "https://github.com/api/v3/orgs/ahrefs/hooks",
184+
"issues_url": "https://github.com/api/v3/orgs/ahrefs/issues",
185+
"members_url": "https://github.com/api/v3/orgs/ahrefs/members{/member}",
186+
"public_members_url": "https://github.com/api/v3/orgs/ahrefs/public_members{/member}",
187+
"avatar_url": "https://github.com/avatars/u/0",
188+
"description": null
189+
},
190+
"enterprise": {
191+
"id": 0,
192+
"slug": "ahrefs-pte-ltd",
193+
"name": "Ahrefs Pte Ltd",
194+
"node_id": "00000000000000000000",
195+
"avatar_url": "https://github.com/avatars/b/0",
196+
"description": null,
197+
"website_url": null,
198+
"html_url": "https://github.com/enterprises/ahrefs-pte-ltd",
199+
"created_at": "2019-01-09T18:50:55Z",
200+
"updated_at": "2019-03-01T16:07:28Z"
201+
},
202+
"sender": {
203+
"login": "ygrek",
204+
"id": 0,
205+
"node_id": "00000000000000000000",
206+
"avatar_url": "https://github.com/avatars/u/0",
207+
"gravatar_id": "",
208+
"url": "https://github.com/api/v3/users/ygrek",
209+
"html_url": "https://github.com/ip",
210+
"followers_url": "https://github.com/api/v3/users/ygrek/followers",
211+
"following_url": "https://github.com/api/v3/users/ygrek/following{/other_user}",
212+
"gists_url": "https://github.com/api/v3/users/ygrek/gists{/gist_id}",
213+
"starred_url": "https://github.com/api/v3/users/ygrek/starred{/owner}{/repo}",
214+
"subscriptions_url": "https://github.com/api/v3/users/ygrek/subscriptions",
215+
"organizations_url": "https://github.com/api/v3/users/ygrek/orgs",
216+
"repos_url": "https://github.com/api/v3/users/ygrek/repos",
217+
"events_url": "https://github.com/api/v3/users/ygrek/events{/privacy}",
218+
"received_events_url": "https://github.com/api/v3/users/ygrek/received_events",
219+
"type": "User",
220+
"site_admin": true
221+
}
222+
}

0 commit comments

Comments
 (0)