Skip to content

Commit

Permalink
style: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Jan 10, 2020
1 parent 252b767 commit 84db661
Show file tree
Hide file tree
Showing 34 changed files with 3,054 additions and 3,175 deletions.
5 changes: 4 additions & 1 deletion lib/record-scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@ async function recordScenario({ request, scenario }) {
nock.recorder.clear();
nock.restore();

return fixtures.map(removeCredentials);
return fixtures.map(removeCredentials).map(fixture => {
fixture.method = fixture.method.toLowerCase();
return fixture;
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,7 @@
"received_events_url": "https://api.github.com/users/octokit-fixture-user-a/received_events",
"type": "User",
"site_admin": false,
"permissions": {
"admin": true,
"push": true,
"pull": true
}
"permissions": { "admin": true, "push": true, "pull": true }
},
{
"login": "octokit-fixture-user-b",
Expand All @@ -390,11 +386,7 @@
"received_events_url": "https://api.github.com/users/octokit-fixture-user-b/received_events",
"type": "User",
"site_admin": false,
"permissions": {
"admin": false,
"push": true,
"pull": true
}
"permissions": { "admin": false, "push": true, "pull": true }
}
],
"reqheaders": {
Expand Down Expand Up @@ -486,11 +478,7 @@
"received_events_url": "https://api.github.com/users/octokit-fixture-user-a/received_events",
"type": "User",
"site_admin": false,
"permissions": {
"admin": true,
"push": true,
"pull": true
}
"permissions": { "admin": true, "push": true, "pull": true }
}
],
"reqheaders": {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"scope": "https://api.github.com:443",
"method": "post",
"path": "/repos/octokit-fixture-org/add-labels-to-issue/issues",
"body": {
"title": "Issue without a label"
},
"body": { "title": "Issue without a label" },
"status": 201,
"response": {
"url": "https://api.github.com/repos/octokit-fixture-org/add-labels-to-issue/issues/1",
Expand Down Expand Up @@ -89,9 +87,7 @@
"scope": "https://api.github.com:443",
"method": "post",
"path": "/repos/octokit-fixture-org/add-labels-to-issue/issues/1/labels",
"body": {
"labels": ["Foo", "bAr", "baZ"]
},
"body": { "labels": ["Foo", "bAr", "baZ"] },
"status": 200,
"response": [
{
Expand Down
221 changes: 110 additions & 111 deletions scenarios/api.github.com/add-labels-to-issue/raw-fixture.json

Large diffs are not rendered by default.

29 changes: 7 additions & 22 deletions scenarios/api.github.com/branch-protection/normalized-fixture.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,9 @@
"url": "https://api.github.com/repos/octokit-fixture-org/branch-protection/branches/master/protection/enforce_admins",
"enabled": false
},
"required_linear_history": {
"enabled": false
},
"allow_force_pushes": {
"enabled": false
},
"allow_deletions": {
"enabled": false
}
"required_linear_history": { "enabled": false },
"allow_force_pushes": { "enabled": false },
"allow_deletions": { "enabled": false }
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
Expand Down Expand Up @@ -101,10 +95,7 @@
"method": "put",
"path": "/repos/octokit-fixture-org/branch-protection/branches/master/protection",
"body": {
"required_status_checks": {
"strict": true,
"contexts": ["foo/bar"]
},
"required_status_checks": { "strict": true, "contexts": ["foo/bar"] },
"required_pull_request_reviews": {
"dismissal_restrictions": {
"users": ["octokit-fixture-user-a"],
Expand Down Expand Up @@ -210,15 +201,9 @@
"url": "https://api.github.com/repos/octokit-fixture-org/branch-protection/branches/master/protection/enforce_admins",
"enabled": true
},
"required_linear_history": {
"enabled": false
},
"allow_force_pushes": {
"enabled": false
},
"allow_deletions": {
"enabled": false
}
"required_linear_history": { "enabled": false },
"allow_force_pushes": { "enabled": false },
"allow_deletions": { "enabled": false }
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
Expand Down
332 changes: 163 additions & 169 deletions scenarios/api.github.com/branch-protection/raw-fixture.json

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions scenarios/api.github.com/create-file/normalized-fixture.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"scope": "https://api.github.com:443",
"method": "put",
"path": "/repos/octokit-fixture-org/create-file/contents/test.txt",
"body": {
"message": "create test.txt",
"content": "VGVzdCBjb250ZW50"
},
"body": { "message": "create test.txt", "content": "VGVzdCBjb250ZW50" },
"status": 201,
"response": {
"content": {
Expand Down
190 changes: 93 additions & 97 deletions scenarios/api.github.com/create-file/raw-fixture.json

Large diffs are not rendered by default.

398 changes: 198 additions & 200 deletions scenarios/api.github.com/create-status/raw-fixture.json

Large diffs are not rendered by default.

13 changes: 2 additions & 11 deletions scenarios/api.github.com/errors/normalized-fixture.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,11 @@
"scope": "https://api.github.com:443",
"method": "post",
"path": "/repos/octokit-fixture-org/errors/labels",
"body": {
"name": "foo",
"color": "invalid"
},
"body": { "name": "foo", "color": "invalid" },
"status": 422,
"response": {
"message": "Validation Failed",
"errors": [
{
"resource": "Label",
"code": "invalid",
"field": "color"
}
],
"errors": [{ "resource": "Label", "code": "invalid", "field": "color" }],
"documentation_url": "https://developer.github.com/v3/issues/labels/#create-a-label"
},
"reqheaders": {
Expand Down

0 comments on commit 84db661

Please sign in to comment.