Fix: get files by path depth (#2993)

* fix: get files up to depth specified by colletion path

* test(e2e): update mock data

* chore: fix comment
This commit is contained in:
Erez Rokah 2019-12-22 15:20:42 +02:00 committed by GitHub
parent 982fd7b0f8
commit b27748b54f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
75 changed files with 4075 additions and 3714 deletions

View File

@ -90,7 +90,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -122,7 +122,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -724,4 +724,4 @@
"response": "{\n \"content\": null,\n \"commit\": {\n \"sha\": \"0e2aff7534af59d4bf136cd683ecb23d1f8eb466\",\n \"node_id\": \"MDY6Q29tbWl0MjI5MDc4Njk5OjBlMmFmZjc1MzRhZjU5ZDRiZjEzNmNkNjgzZWNiMjNkMWY4ZWI0NjY=\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/commits/0e2aff7534af59d4bf136cd683ecb23d1f8eb466\",\n \"html_url\": \"https://github.com/owner/repo/commit/0e2aff7534af59d4bf136cd683ecb23d1f8eb466\",\n \"author\": {\n \"name\": \"owner\",\n \"email\": \"owner@users.noreply.github.com\",\n \"date\": \"2019-12-19T15:09:36Z\"\n },\n \"committer\": {\n \"name\": \"owner\",\n \"email\": \"owner@users.noreply.github.com\",\n \"date\": \"2019-12-19T15:09:36Z\"\n },\n \"tree\": {\n \"sha\": \"43ece6734c2c9b1784b340b89ad31f72de2c2f92\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/trees/43ece6734c2c9b1784b340b89ad31f72de2c2f92\"\n },\n \"message\": \"Delete “static/media/netlify.png”\",\n \"parents\": [\n {\n \"sha\": \"38cd96752498d7cb474f74a8f51726be106d2b30\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/commits/38cd96752498d7cb474f74a8f51726be106d2b30\",\n \"html_url\": \"https://github.com/owner/repo/commit/38cd96752498d7cb474f74a8f51726be106d2b30\"\n }\n ],\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n }\n}\n",
"status": 200
}
]
]

View File

@ -124,7 +124,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -156,7 +156,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1752,7 +1752,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=300&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=300",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1886,7 +1886,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=300&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=300",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1952,4 +1952,4 @@
"response": "{\n \"name\": \"1970-01-01-first-title.md\",\n \"path\": \"content/posts/1970-01-01-first-title.md\",\n \"sha\": \"528b58447015c676a0f055a939ff65b64c7ba147\",\n \"size\": 181,\n \"url\": \"https://api.github.com/repos/owner/repo/contents/content/posts/1970-01-01-first-title.md?ref=master\",\n \"html_url\": \"https://github.com/owner/repo/blob/master/content/posts/1970-01-01-first-title.md\",\n \"git_url\": \"https://api.github.com/repos/owner/repo/git/blobs/528b58447015c676a0f055a939ff65b64c7ba147\",\n \"download_url\": \"https://raw.githubusercontent.com/owner/repo/master/content/posts/1970-01-01-first-title.md\",\n \"type\": \"file\",\n \"content\": \"LS0tCnRlbXBsYXRlOiBwb3N0CnRpdGxlOiBmaXJzdCB0aXRsZQppbWFnZTog\\nL21lZGlhL25ldGxpZnkucG5nCmRhdGU6IDE5NzAtMDEtMDFUMDA6MDA6MDAu\\nMDAwWgpkZXNjcmlwdGlvbjogZmlyc3QgZGVzY3JpcHRpb24KY2F0ZWdvcnk6\\nIGZpcnN0IGNhdGVnb3J5CnRhZ3M6CiAgLSB0YWcxCi0tLQpmaXJzdCBib2R5\\nCg==\\n\",\n \"encoding\": \"base64\",\n \"_links\": {\n \"self\": \"https://api.github.com/repos/owner/repo/contents/content/posts/1970-01-01-first-title.md?ref=master\",\n \"git\": \"https://api.github.com/repos/owner/repo/git/blobs/528b58447015c676a0f055a939ff65b64c7ba147\",\n \"html\": \"https://github.com/owner/repo/blob/master/content/posts/1970-01-01-first-title.md\"\n }\n}\n",
"status": 200
}
]
]

View File

@ -90,7 +90,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -192,7 +192,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1406,4 +1406,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"069842d4601798ac55fc5feaafdcb54f93ef69f6\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229078699,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzg2OTk=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/069842d4601798ac55fc5feaafdcb54f93ef69f6\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/069842d4601798ac55fc5feaafdcb54f93ef69f6/status\"\n}\n",
"status": 200
}
]
]

View File

@ -124,7 +124,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -158,7 +158,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -460,4 +460,4 @@
"response": "{\n \"sha\": \"406a244d1522a3c809efab0c9ce46bbd86aa9c1d\",\n \"node_id\": \"MDQ6QmxvYjIyOTA3ODY5OTo0MDZhMjQ0ZDE1MjJhM2M4MDllZmFiMGM5Y2U0NmJiZDg2YWE5YzFk\",\n \"size\": 188,\n \"url\": \"https://api.github.com/repos/owner/repo/git/blobs/406a244d1522a3c809efab0c9ce46bbd86aa9c1d\",\n \"content\": \"Ly5naXRodWIgZXhwb3J0LWlnbm9yZQovLmdpdGF0dHJpYnV0ZXMgZXhwb3J0\\nLWlnbm9yZQovLmVkaXRvcmNvbmZpZyBleHBvcnQtaWdub3JlCi8udHJhdmlz\\nLnltbCBleHBvcnQtaWdub3JlCioqLyouanMuc25hcCBleHBvcnQtaWdub3Jl\\nCnN0YXRpYy9tZWRpYS8qKiBmaWx0ZXI9bGZzIGRpZmY9bGZzIG1lcmdlPWxm\\ncyAtdGV4dAo=\\n\",\n \"encoding\": \"base64\"\n}\n",
"status": 200
}
]
]

View File

@ -90,7 +90,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -124,7 +124,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -691,4 +691,4 @@
"response": "{\n \"ref\": \"refs/heads/master\",\n \"node_id\": \"MDM6UmVmMjI5MDc4Njk5Om1hc3Rlcg==\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/refs/heads/master\",\n \"object\": {\n \"sha\": \"38cd96752498d7cb474f74a8f51726be106d2b30\",\n \"type\": \"commit\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/commits/38cd96752498d7cb474f74a8f51726be106d2b30\"\n }\n}\n",
"status": 200
}
]
]

View File

@ -90,7 +90,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -124,7 +124,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1230,4 +1230,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"069842d4601798ac55fc5feaafdcb54f93ef69f6\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229078699,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzg2OTk=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/069842d4601798ac55fc5feaafdcb54f93ef69f6\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/069842d4601798ac55fc5feaafdcb54f93ef69f6/status\"\n}\n",
"status": 200
}
]
]

View File

@ -158,7 +158,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -192,7 +192,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1786,7 +1786,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=300&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=300",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1842,4 +1842,4 @@
},
"status": 200
}
]
]

View File

@ -158,7 +158,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -190,7 +190,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/.netlify/git/github/git/trees/master:content/posts?ts=0",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1720,7 +1720,7 @@
},
{
"method": "GET",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=300&recursive=10",
"url": "/.netlify/git/github/git/trees/master:static/media?ts=300",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "http://localhost:8080",
@ -1752,4 +1752,4 @@
"response": "{\n \"sha\": \"d5006b79d357bf03b74dcff1798dbd9f24532eee\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/trees/d5006b79d357bf03b74dcff1798dbd9f24532eee\",\n \"tree\": [\n {\n \"path\": \"netlify.png\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"sha\": \"a137fb3458d391f2740ecc6ebbda52107d65d6ef\",\n \"size\": 129,\n \"url\": \"https://api.github.com/repos/owner/repo/git/blobs/a137fb3458d391f2740ecc6ebbda52107d65d6ef\"\n }\n ],\n \"truncated\": false\n}\n",
"status": 200
}
]
]

File diff suppressed because one or more lines are too long

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -77,7 +77,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -420,4 +420,4 @@
"response": "{\n \"content\": null,\n \"commit\": {\n \"sha\": \"a1d609a514d3a3256116345511f34ed4c8484f49\",\n \"node_id\": \"MDY6Q29tbWl0MjI5MDgxOTQ1OmExZDYwOWE1MTRkM2EzMjU2MTE2MzQ1NTExZjM0ZWQ0Yzg0ODRmNDk=\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/commits/a1d609a514d3a3256116345511f34ed4c8484f49\",\n \"html_url\": \"https://github.com/owner/repo/commit/a1d609a514d3a3256116345511f34ed4c8484f49\",\n \"author\": {\n \"name\": \"owner\",\n \"email\": \"owner@users.noreply.github.com\",\n \"date\": \"2019-12-19T15:21:17Z\"\n },\n \"committer\": {\n \"name\": \"owner\",\n \"email\": \"owner@users.noreply.github.com\",\n \"date\": \"2019-12-19T15:21:17Z\"\n },\n \"tree\": {\n \"sha\": \"b7e139606ccb7a9063d4ffe53574aacba4c34f26\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/trees/b7e139606ccb7a9063d4ffe53574aacba4c34f26\"\n },\n \"message\": \"Delete “static/media/netlify.png”\",\n \"parents\": [\n {\n \"sha\": \"a96988564a908d587de79b8800ee4c384cd18a11\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/commits/a96988564a908d587de79b8800ee4c384cd18a11\",\n \"html_url\": \"https://github.com/owner/repo/commit/a96988564a908d587de79b8800ee4c384cd18a11\"\n }\n ],\n \"verification\": {\n \"verified\": false,\n \"reason\": \"unsigned\",\n \"signature\": null,\n \"payload\": null\n }\n }\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -79,7 +79,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1219,7 +1219,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1295,7 +1295,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1345,4 +1345,4 @@
"response": "{\n \"name\": \"1970-01-01-first-title.md\",\n \"path\": \"content/posts/1970-01-01-first-title.md\",\n \"sha\": \"528b58447015c676a0f055a939ff65b64c7ba147\",\n \"size\": 181,\n \"url\": \"https://api.github.com/repos/owner/repo/contents/content/posts/1970-01-01-first-title.md?ref=master\",\n \"html_url\": \"https://github.com/owner/repo/blob/master/content/posts/1970-01-01-first-title.md\",\n \"git_url\": \"https://api.github.com/repos/owner/repo/git/blobs/528b58447015c676a0f055a939ff65b64c7ba147\",\n \"download_url\": \"https://raw.githubusercontent.com/owner/repo/master/content/posts/1970-01-01-first-title.md\",\n \"type\": \"file\",\n \"content\": \"LS0tCnRlbXBsYXRlOiBwb3N0CnRpdGxlOiBmaXJzdCB0aXRsZQppbWFnZTog\\nL21lZGlhL25ldGxpZnkucG5nCmRhdGU6IDE5NzAtMDEtMDFUMDA6MDA6MDAu\\nMDAwWgpkZXNjcmlwdGlvbjogZmlyc3QgZGVzY3JpcHRpb24KY2F0ZWdvcnk6\\nIGZpcnN0IGNhdGVnb3J5CnRhZ3M6CiAgLSB0YWcxCi0tLQpmaXJzdCBib2R5\\nCg==\\n\",\n \"encoding\": \"base64\",\n \"_links\": {\n \"self\": \"https://api.github.com/repos/owner/repo/contents/content/posts/1970-01-01-first-title.md?ref=master\",\n \"git\": \"https://api.github.com/repos/owner/repo/git/blobs/528b58447015c676a0f055a939ff65b64c7ba147\",\n \"html\": \"https://github.com/owner/repo/blob/master/content/posts/1970-01-01-first-title.md\"\n }\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -77,7 +77,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -926,4 +926,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"2110f02726edcfff1090180695a207946b863370\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229081945,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwODE5NDU=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/2110f02726edcfff1090180695a207946b863370\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/2110f02726edcfff1090180695a207946b863370/status\"\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -77,7 +77,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -231,4 +231,4 @@
"response": "{\n \"sha\": \"6d51a38aed7139d2117724b1e307657b6ff2d043\",\n \"node_id\": \"MDQ6QmxvYjIyOTA4MTk0NTo2ZDUxYTM4YWVkNzEzOWQyMTE3NzI0YjFlMzA3NjU3YjZmZjJkMDQz\",\n \"size\": 1707,\n \"url\": \"https://api.github.com/repos/owner/repo/git/blobs/6d51a38aed7139d2117724b1e307657b6ff2d043\",\n \"content\": \"LS0tCnRpdGxlOiBQZXJmZWN0aW5nIHRoZSBBcnQgb2YgUGVyZmVjdGlvbgpk\\nYXRlOiAiMjAxNi0wOS0wMVQyMzo0NjozNy4xMjFaIgp0ZW1wbGF0ZTogInBv\\nc3QiCmRyYWZ0OiBmYWxzZQpjYXRlZ29yeTogIkRlc2lnbiBJbnNwaXJhdGlv\\nbiIKdGFnczoKICAtICJIYW5kd3JpdGluZyIKICAtICJMZWFybmluZyB0byB3\\ncml0ZSIKZGVzY3JpcHRpb246ICJRdWlzcXVlIGN1cnN1cywgbWV0dXMgdml0\\nYWUgcGhhcmV0cmEgYXVjdG9yLCBzZW0gbWFzc2EgbWF0dGlzIHNlbSwgYXQg\\naW50ZXJkdW0gbWFnbmEgYXVndWUgZWdldCBkaWFtLiBWZXN0aWJ1bHVtIGFu\\ndGUgaXBzdW0gcHJpbWlzIGluIGZhdWNpYnVzIG9yY2kgbHVjdHVzIGV0IHVs\\ndHJpY2VzIHBvc3VlcmUgY3ViaWxpYSBDdXJhZTsgTW9yYmkgbGFjaW5pYSBt\\nb2xlc3RpZSBkdWkuIFByYWVzZW50IGJsYW5kaXQgZG9sb3IuIFNlZCBub24g\\ncXVhbS4gSW4gdmVsIG1pIHNpdCBhbWV0IGF1Z3VlIGNvbmd1ZSBlbGVtZW50\\ndW0uIgpjYW5vbmljYWw6ICcnCi0tLQoKUXVpc3F1ZSBjdXJzdXMsIG1ldHVz\\nIHZpdGFlIHBoYXJldHJhIGF1Y3Rvciwgc2VtIG1hc3NhIG1hdHRpcyBzZW0s\\nIGF0IGludGVyZHVtIG1hZ25hIGF1Z3VlIGVnZXQgZGlhbS4gVmVzdGlidWx1\\nbSBhbnRlIGlwc3VtIHByaW1pcyBpbiBmYXVjaWJ1cyBvcmNpIGx1Y3R1cyBl\\ndCB1bHRyaWNlcyBwb3N1ZXJlIGN1YmlsaWEgQ3VyYWU7IE1vcmJpIGxhY2lu\\naWEgbW9sZXN0aWUgZHVpLiBQcmFlc2VudCBibGFuZGl0IGRvbG9yLiBTZWQg\\nbm9uIHF1YW0uIEluIHZlbCBtaSBzaXQgYW1ldCBhdWd1ZSBjb25ndWUgZWxl\\nbWVudHVtLgoKIVtOdWxsYSBmYXVjaWJ1cyB2ZXN0aWJ1bHVtIGVyb3MgaW4g\\ndGVtcHVzLiBWZXN0aWJ1bHVtIHRlbXBvciBpbXBlcmRpZXQgdmVsaXQgbmVj\\nIGRhcGlidXNdKC9tZWRpYS9pbWFnZS0yLmpwZykKClBlbGxlbnRlc3F1ZSBo\\nYWJpdGFudCBtb3JiaSB0cmlzdGlxdWUgc2VuZWN0dXMgZXQgbmV0dXMgZXQg\\nbWFsZXN1YWRhIGZhbWVzIGFjIHR1cnBpcyBlZ2VzdGFzLiBWZXN0aWJ1bHVt\\nIHRvcnRvciBxdWFtLCBmZXVnaWF0IHZpdGFlLCB1bHRyaWNpZXMgZWdldCwg\\ndGVtcG9yIHNpdCBhbWV0LCBhbnRlLiBEb25lYyBldSBsaWJlcm8gc2l0IGFt\\nZXQgcXVhbSBlZ2VzdGFzIHNlbXBlci4gQWVuZWFuIHVsdHJpY2llcyBtaSB2\\naXRhZSBlc3QuIE1hdXJpcyBwbGFjZXJhdCBlbGVpZmVuZCBsZW8uIFF1aXNx\\ndWUgc2l0IGFtZXQgZXN0IGV0IHNhcGllbiB1bGxhbWNvcnBlciBwaGFyZXRy\\nYS4gVmVzdGlidWx1bSBlcmF0IHdpc2ksIGNvbmRpbWVudHVtIHNlZCwgY29t\\nbW9kbyB2aXRhZSwgb3JuYXJlIHNpdCBhbWV0LCB3aXNpLiBBZW5lYW4gZmVy\\nbWVudHVtLCBlbGl0IGVnZXQgdGluY2lkdW50IGNvbmRpbWVudHVtLCBlcm9z\\nIGlwc3VtIHJ1dHJ1bSBvcmNpLCBzYWdpdHRpcyB0ZW1wdXMgbGFjdXMgZW5p\\nbSBhYyBkdWkuIERvbmVjIG5vbiBlbmltIGluIHR1cnBpcyBwdWx2aW5hciBm\\nYWNpbGlzaXMuIFV0IGZlbGlzLiAKClByYWVzZW50IGRhcGlidXMsIG5lcXVl\\nIGlkIGN1cnN1cyBmYXVjaWJ1cywgdG9ydG9yIG5lcXVlIGVnZXN0YXMgYXVn\\ndWUsIGV1IHZ1bHB1dGF0ZSBtYWduYSBlcm9zIGV1IGVyYXQuIEFsaXF1YW0g\\nZXJhdCB2b2x1dHBhdC4gTmFtIGR1aSBtaSwgdGluY2lkdW50IHF1aXMsIGFj\\nY3Vtc2FuIHBvcnR0aXRvciwgZmFjaWxpc2lzIGx1Y3R1cywgbWV0dXMu\\n\",\n \"encoding\": \"base64\"\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -77,7 +77,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -368,4 +368,4 @@
"response": "{\n \"ref\": \"refs/heads/master\",\n \"node_id\": \"MDM6UmVmMjI5MDgxOTQ1Om1hc3Rlcg==\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/refs/heads/master\",\n \"object\": {\n \"sha\": \"858b6f1f21cfe6db296a90a2f57856b1fdadbab1\",\n \"type\": \"commit\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/commits/858b6f1f21cfe6db296a90a2f57856b1fdadbab1\"\n }\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -77,7 +77,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -816,4 +816,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"6e2776f31997c35d747f9a38a00f7b97d94921f7\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229081945,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwODE5NDU=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/6e2776f31997c35d747f9a38a00f7b97d94921f7\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/6e2776f31997c35d747f9a38a00f7b97d94921f7/status\"\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -79,7 +79,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1219,7 +1219,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1243,4 +1243,4 @@
"response": "{\n \"sha\": \"c240f73ec047174f525b975157c1271fffdc2470\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/trees/c240f73ec047174f525b975157c1271fffdc2470\",\n \"tree\": [\n {\n \"path\": \"netlify.png\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"sha\": \"13692e6574cb4bf447aefcf7e0278e2f3fad6cf3\",\n \"size\": 3470,\n \"url\": \"https://api.github.com/repos/owner/repo/git/blobs/13692e6574cb4bf447aefcf7e0278e2f3fad6cf3\"\n }\n ],\n \"truncated\": false\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -79,7 +79,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1169,7 +1169,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1193,4 +1193,4 @@
"response": "{\n \"sha\": \"c240f73ec047174f525b975157c1271fffdc2470\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/trees/c240f73ec047174f525b975157c1271fffdc2470\",\n \"tree\": [\n {\n \"path\": \"netlify.png\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"sha\": \"13692e6574cb4bf447aefcf7e0278e2f3fad6cf3\",\n \"size\": 3470,\n \"url\": \"https://api.github.com/repos/owner/repo/git/blobs/13692e6574cb4bf447aefcf7e0278e2f3fad6cf3\"\n }\n ],\n \"truncated\": false\n}\n",
"status": 200
}
]
]

View File

@ -2747,4 +2747,4 @@
"response": "{\"data\":{\"repository\":{\"id\":\"MDEwOlJlcG9zaXRvcnkyMjkwODcxNjc=\",\"__typename\":\"Repository\",\"object\":{\"id\":\"MDQ6QmxvYjIyOTA4NzE2Nzo3NjI3MjJiNzkyOTRlODI1ZTVmMjIxOTRmOTI3M2I1M2EyYTNlNmQ1\",\"text\":\"---\\ntemplate: post\\ntitle: first title\\ndate: 1970-01-01T00:00:00.000Z\\ndescription: first description\\ncategory: first category\\ntags:\\n - tag1\\n---\\nfirst body\\n\",\"is_binary\":false,\"__typename\":\"Blob\"}}}}\n",
"status": 200
}
]
]

View File

@ -975,4 +975,4 @@
"response": "{\n \"ref\": \"refs/meta/_netlify_cms\",\n \"node_id\": \"MDM6UmVmMjI5MDcyMDg0OnJlZnMvbWV0YS9fbmV0bGlmeV9jbXM=\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/refs/meta/_netlify_cms\",\n \"object\": {\n \"sha\": \"3459c450275258e4ca72a31be38762a1accbde9c\",\n \"type\": \"commit\",\n \"url\": \"https://api.github.com/repos/owner/repo/git/commits/3459c450275258e4ca72a31be38762a1accbde9c\"\n }\n}\n",
"status": 200
}
]
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1084,4 +1084,4 @@
"response": "{\"data\":{\"repository\":{\"id\":\"MDEwOlJlcG9zaXRvcnkyMjkwNzIwODQ=\",\"__typename\":\"Repository\",\"object\":null}}}\n",
"status": 200
}
]
]

File diff suppressed because one or more lines are too long

View File

@ -1004,4 +1004,4 @@
"response": "{\"data\":{\"repository\":{\"id\":\"MDEwOlJlcG9zaXRvcnkyMjgxNTk4MjI=\",\"__typename\":\"Repository\",\"object\":{\"id\":\"MDY6Q29tbWl0MjI4MTU5ODIyOjFiMjRhOTJiODgxYWYwYjQ4N2E3NTkwOGM2ZWNjZmY3NjYwYWVhYmU=\",\"sha\":\"1b24a92b881af0b487a75908c6eccff7660aeabe\",\"__typename\":\"Commit\",\"status\":null}}}}\n",
"status": 200
}
]
]

File diff suppressed because one or more lines are too long

View File

@ -179,7 +179,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -205,7 +205,7 @@
},
{
"method": "GET",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1024,4 +1024,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"ffef8d751ac3208834c361f614c4d21b71ec88f2\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229073034,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzMwMzQ=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/ffef8d751ac3208834c361f614c4d21b71ec88f2\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/ffef8d751ac3208834c361f614c4d21b71ec88f2/status\"\n}\n",
"status": 200
}
]
]

View File

@ -179,7 +179,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -205,7 +205,7 @@
},
{
"method": "GET",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -892,4 +892,4 @@
"response": "{\n \"sha\": \"762722b79294e825e5f22194f9273b53a2a3e6d5\",\n \"node_id\": \"MDQ6QmxvYjIyOTA3MzYwMjo3NjI3MjJiNzkyOTRlODI1ZTVmMjIxOTRmOTI3M2I1M2EyYTNlNmQ1\",\n \"size\": 155,\n \"url\": \"https://api.github.com/repos/forkOwner/repo/git/blobs/762722b79294e825e5f22194f9273b53a2a3e6d5\",\n \"content\": \"LS0tCnRlbXBsYXRlOiBwb3N0CnRpdGxlOiBmaXJzdCB0aXRsZQpkYXRlOiAx\\nOTcwLTAxLTAxVDAwOjAwOjAwLjAwMFoKZGVzY3JpcHRpb246IGZpcnN0IGRl\\nc2NyaXB0aW9uCmNhdGVnb3J5OiBmaXJzdCBjYXRlZ29yeQp0YWdzOgogIC0g\\ndGFnMQotLS0KZmlyc3QgYm9keQo=\\n\",\n \"encoding\": \"base64\"\n}\n",
"status": 200
}
]
]

View File

@ -105,7 +105,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -131,7 +131,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -898,4 +898,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"8f504a225b7823dae7fdcee3c8af2730b5ed3b70\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229073034,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzMwMzQ=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/8f504a225b7823dae7fdcee3c8af2730b5ed3b70\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/8f504a225b7823dae7fdcee3c8af2730b5ed3b70/status\"\n}\n",
"status": 200
}
]
]

View File

@ -179,7 +179,7 @@
},
{
"method": "GET",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -203,7 +203,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1185,4 +1185,4 @@
"response": "{\n \"ref\": \"refs/meta/_netlify_cms\",\n \"node_id\": \"MDM6UmVmMjI5MDczNjAyOnJlZnMvbWV0YS9fbmV0bGlmeV9jbXM=\",\n \"url\": \"https://api.github.com/repos/forkOwner/repo/git/refs/meta/_netlify_cms\",\n \"object\": {\n \"sha\": \"20b279fca0fe0c4f19a928dedb4e36cd31d86245\",\n \"type\": \"commit\",\n \"url\": \"https://api.github.com/repos/forkOwner/repo/git/commits/20b279fca0fe0c4f19a928dedb4e36cd31d86245\"\n }\n}\n",
"status": 200
}
]
]

View File

@ -105,7 +105,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -129,7 +129,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1191,7 +1191,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1239,4 +1239,4 @@
"response": "{\n \"name\": \"1970-01-01-first-title.md\",\n \"path\": \"content/posts/1970-01-01-first-title.md\",\n \"sha\": \"762722b79294e825e5f22194f9273b53a2a3e6d5\",\n \"size\": 155,\n \"url\": \"https://api.github.com/repos/owner/repo/contents/content/posts/1970-01-01-first-title.md?ref=master\",\n \"html_url\": \"https://github.com/owner/repo/blob/master/content/posts/1970-01-01-first-title.md\",\n \"git_url\": \"https://api.github.com/repos/owner/repo/git/blobs/762722b79294e825e5f22194f9273b53a2a3e6d5\",\n \"download_url\": \"https://raw.githubusercontent.com/owner/repo/master/content/posts/1970-01-01-first-title.md\",\n \"type\": \"file\",\n \"content\": \"LS0tCnRlbXBsYXRlOiBwb3N0CnRpdGxlOiBmaXJzdCB0aXRsZQpkYXRlOiAx\\nOTcwLTAxLTAxVDAwOjAwOjAwLjAwMFoKZGVzY3JpcHRpb246IGZpcnN0IGRl\\nc2NyaXB0aW9uCmNhdGVnb3J5OiBmaXJzdCBjYXRlZ29yeQp0YWdzOgogIC0g\\ndGFnMQotLS0KZmlyc3QgYm9keQo=\\n\",\n \"encoding\": \"base64\",\n \"_links\": {\n \"self\": \"https://api.github.com/repos/owner/repo/contents/content/posts/1970-01-01-first-title.md?ref=master\",\n \"git\": \"https://api.github.com/repos/owner/repo/git/blobs/762722b79294e825e5f22194f9273b53a2a3e6d5\",\n \"html\": \"https://github.com/owner/repo/blob/master/content/posts/1970-01-01-first-title.md\"\n }\n}\n",
"status": 200
}
]
]

View File

@ -179,7 +179,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -205,7 +205,7 @@
},
{
"method": "GET",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1326,4 +1326,4 @@
"response": "{\n \"ref\": \"refs/meta/_netlify_cms\",\n \"node_id\": \"MDM6UmVmMjI5MDczNjAyOnJlZnMvbWV0YS9fbmV0bGlmeV9jbXM=\",\n \"url\": \"https://api.github.com/repos/forkOwner/repo/git/refs/meta/_netlify_cms\",\n \"object\": {\n \"sha\": \"af1092eedcacb6f8cad2a4b48536c7aa502e4010\",\n \"type\": \"commit\",\n \"url\": \"https://api.github.com/repos/forkOwner/repo/git/commits/af1092eedcacb6f8cad2a4b48536c7aa502e4010\"\n }\n}\n",
"status": 200
}
]
]

View File

@ -179,7 +179,7 @@
},
{
"method": "GET",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/forkOwner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -203,7 +203,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1157,4 +1157,4 @@
"response": "{\n \"ref\": \"refs/heads/cms/forkOwner/repo/posts/1970-01-01-first-title\",\n \"node_id\": \"MDM6UmVmMjI5MDczNjAyOmNtcy9lcmV6cm9rYWgtdGVzdC9nYXRzYnktbmV0bGlmeS1jbXMtYXdzLXRlc3QtMTU3Njc2NjIyMDI2MC1tMXBlMTZiajloZy9wb3N0cy8xOTcwLTAxLTAxLWZpcnN0LXRpdGxl\",\n \"url\": \"https://api.github.com/repos/forkOwner/repo/git/refs/heads/cms/forkOwner/repo/posts/1970-01-01-first-title\",\n \"object\": {\n \"sha\": \"5bd239db8d6b1fa2ce294c114658c0fda6231d9e\",\n \"type\": \"commit\",\n \"url\": \"https://api.github.com/repos/forkOwner/repo/git/commits/5bd239db8d6b1fa2ce294c114658c0fda6231d9e\"\n }\n}\n",
"status": 200
}
]
]

View File

@ -105,7 +105,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -129,7 +129,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1397,4 +1397,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"c50597f524cc6b0568c4998c361ea857cc50e472\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229073034,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzMwMzQ=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/c50597f524cc6b0568c4998c361ea857cc50e472\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/c50597f524cc6b0568c4998c361ea857cc50e472/status\"\n}\n",
"status": 200
}
]
]

View File

@ -81,7 +81,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -107,7 +107,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -2481,7 +2481,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=900&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=900",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -2666,7 +2666,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=900&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=900",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -2903,7 +2903,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=900&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=900",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -2925,4 +2925,4 @@
"response": "{\n \"message\": \"Not Found\",\n \"documentation_url\": \"https://developer.github.com/v3/git/trees/#get-a-tree\"\n}\n",
"status": 404
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -79,7 +79,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1119,4 +1119,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"c703744993b94ac4b006d4edbfdebf27c6c2010d\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229077208,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzcyMDg=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/c703744993b94ac4b006d4edbfdebf27c6c2010d\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/c703744993b94ac4b006d4edbfdebf27c6c2010d/status\"\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -79,7 +79,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -846,4 +846,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"61605bc9b0ffc98298cfcf4655cafa5dd01899b4\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229077208,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzcyMDg=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/61605bc9b0ffc98298cfcf4655cafa5dd01899b4\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/61605bc9b0ffc98298cfcf4655cafa5dd01899b4/status\"\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -79,7 +79,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -923,4 +923,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"6351a875733a149011b52f6e84fbdd375bad7bde\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229077208,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzcyMDg=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/6351a875733a149011b52f6e84fbdd375bad7bde\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/6351a875733a149011b52f6e84fbdd375bad7bde/status\"\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -77,7 +77,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1165,7 +1165,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=300",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1187,4 +1187,4 @@
"response": "{\n \"message\": \"Not Found\",\n \"documentation_url\": \"https://developer.github.com/v3/git/trees/#get-a-tree\"\n}\n",
"status": 404
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -77,7 +77,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1371,4 +1371,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"a81f20c09fdcf02fec8cbb03b2153274eafc029d\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229077208,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzcyMDg=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/a81f20c09fdcf02fec8cbb03b2153274eafc029d\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/a81f20c09fdcf02fec8cbb03b2153274eafc029d/status\"\n}\n",
"status": 200
}
]
]

View File

@ -53,7 +53,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:content/posts?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -79,7 +79,7 @@
},
{
"method": "GET",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0&recursive=10",
"url": "/repos/owner/repo/git/trees/master:static/media?ts=0",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
@ -1064,4 +1064,4 @@
"response": "{\n \"state\": \"pending\",\n \"statuses\": [\n\n ],\n \"sha\": \"5f98f0863da138399399aba361ce28efe5c8dd0a\",\n \"total_count\": 0,\n \"repository\": {\n \"id\": 229077208,\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyMjkwNzcyMDg=\",\n \"name\": \"repo\",\n \"full_name\": \"owner/repo\",\n \"private\": false,\n \"owner\": {\n \"login\": \"owner\",\n \"id\": 26760571,\n \"node_id\": \"MDQ6VXNlcjI2NzYwNTcx\",\n \"avatar_url\": \"https://avatars1.githubusercontent.com/u/7892489?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/owner\",\n \"html_url\": \"https://github.com/owner\",\n \"followers_url\": \"https://api.github.com/users/owner/followers\",\n \"following_url\": \"https://api.github.com/users/owner/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/owner/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/owner/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/owner/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/owner/orgs\",\n \"repos_url\": \"https://api.github.com/users/owner/repos\",\n \"events_url\": \"https://api.github.com/users/owner/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/owner/received_events\",\n \"type\": \"User\",\n \"site_admin\": false\n },\n \"html_url\": \"https://github.com/owner/repo\",\n \"description\": null,\n \"fork\": false,\n \"url\": \"https://api.github.com/repos/owner/repo\",\n \"forks_url\": \"https://api.github.com/repos/owner/repo/forks\",\n \"keys_url\": \"https://api.github.com/repos/owner/repo/keys{/key_id}\",\n \"collaborators_url\": \"https://api.github.com/repos/owner/repo/collaborators{/collaborator}\",\n \"teams_url\": \"https://api.github.com/repos/owner/repo/teams\",\n \"hooks_url\": \"https://api.github.com/repos/owner/repo/hooks\",\n \"issue_events_url\": \"https://api.github.com/repos/owner/repo/issues/events{/number}\",\n \"events_url\": \"https://api.github.com/repos/owner/repo/events\",\n \"assignees_url\": \"https://api.github.com/repos/owner/repo/assignees{/user}\",\n \"branches_url\": \"https://api.github.com/repos/owner/repo/branches{/branch}\",\n \"tags_url\": \"https://api.github.com/repos/owner/repo/tags\",\n \"blobs_url\": \"https://api.github.com/repos/owner/repo/git/blobs{/sha}\",\n \"git_tags_url\": \"https://api.github.com/repos/owner/repo/git/tags{/sha}\",\n \"git_refs_url\": \"https://api.github.com/repos/owner/repo/git/refs{/sha}\",\n \"trees_url\": \"https://api.github.com/repos/owner/repo/git/trees{/sha}\",\n \"statuses_url\": \"https://api.github.com/repos/owner/repo/statuses/{sha}\",\n \"languages_url\": \"https://api.github.com/repos/owner/repo/languages\",\n \"stargazers_url\": \"https://api.github.com/repos/owner/repo/stargazers\",\n \"contributors_url\": \"https://api.github.com/repos/owner/repo/contributors\",\n \"subscribers_url\": \"https://api.github.com/repos/owner/repo/subscribers\",\n \"subscription_url\": \"https://api.github.com/repos/owner/repo/subscription\",\n \"commits_url\": \"https://api.github.com/repos/owner/repo/commits{/sha}\",\n \"git_commits_url\": \"https://api.github.com/repos/owner/repo/git/commits{/sha}\",\n \"comments_url\": \"https://api.github.com/repos/owner/repo/comments{/number}\",\n \"issue_comment_url\": \"https://api.github.com/repos/owner/repo/issues/comments{/number}\",\n \"contents_url\": \"https://api.github.com/repos/owner/repo/contents/{+path}\",\n \"compare_url\": \"https://api.github.com/repos/owner/repo/compare/{base}...{head}\",\n \"merges_url\": \"https://api.github.com/repos/owner/repo/merges\",\n \"archive_url\": \"https://api.github.com/repos/owner/repo/{archive_format}{/ref}\",\n \"downloads_url\": \"https://api.github.com/repos/owner/repo/downloads\",\n \"issues_url\": \"https://api.github.com/repos/owner/repo/issues{/number}\",\n \"pulls_url\": \"https://api.github.com/repos/owner/repo/pulls{/number}\",\n \"milestones_url\": \"https://api.github.com/repos/owner/repo/milestones{/number}\",\n \"notifications_url\": \"https://api.github.com/repos/owner/repo/notifications{?since,all,participating}\",\n \"labels_url\": \"https://api.github.com/repos/owner/repo/labels{/name}\",\n \"releases_url\": \"https://api.github.com/repos/owner/repo/releases{/id}\",\n \"deployments_url\": \"https://api.github.com/repos/owner/repo/deployments\"\n },\n \"commit_url\": \"https://api.github.com/repos/owner/repo/commits/5f98f0863da138399399aba361ce28efe5c8dd0a\",\n \"url\": \"https://api.github.com/repos/owner/repo/commits/5f98f0863da138399399aba361ce28efe5c8dd0a/status\"\n}\n",
"status": 200
}
]
]

File diff suppressed because one or more lines are too long

View File

@ -114,11 +114,11 @@ export default class API {
};
};
listFiles = async path => {
listFiles = async (path, depth) => {
const node = await this.branchCommitSha();
const { entries, cursor } = await flow([
// sort files by filename ascending
unsentRequest.withParams({ sort: '-path', max_depth: 10 }),
unsentRequest.withParams({ sort: '-path', max_depth: depth }),
this.requestJSON,
then(this.getEntriesAndCursor),
])(`${this.repoURL}/src/${node}/${path}`);
@ -135,8 +135,8 @@ export default class API {
})),
])(cursor.data.getIn(['links', action]));
listAllFiles = async path => {
const { cursor: initialCursor, entries: initialEntries } = await this.listFiles(path);
listAllFiles = async (path, depth) => {
const { cursor: initialCursor, entries: initialEntries } = await this.listFiles(path, depth);
const entries = [...initialEntries];
let currentCursor = initialCursor;
while (currentCursor && currentCursor.actions.has('next')) {

View File

@ -9,6 +9,7 @@ import {
unsentRequest,
basename,
getBlobSHA,
getCollectionDepth,
} from 'netlify-cms-lib-util';
import { NetlifyAuthenticator } from 'netlify-cms-lib-auth';
import AuthenticationPage from './AuthenticationPage';
@ -165,7 +166,10 @@ export default class BitbucketBackend {
};
entriesByFolder(collection, extension) {
const listPromise = this.api.listFiles(collection.get('folder'));
const listPromise = this.api.listFiles(
collection.get('folder'),
getCollectionDepth(collection),
);
return resolvePromiseProperties({
files: listPromise
.then(({ entries }) => entries)
@ -180,7 +184,7 @@ export default class BitbucketBackend {
allEntriesByFolder(collection, extension) {
return this.api
.listAllFiles(collection.get('folder'))
.listAllFiles(collection.get('folder'), getCollectionDepth(collection))
.then(filterByPropExtension(extension, 'path'))
.then(this.fetchFiles);
}

View File

@ -11,6 +11,7 @@ import {
onlySuccessfulPromises,
resolvePromiseProperties,
ResponseParser,
basename,
} from 'netlify-cms-lib-util';
import {
UsersGetAuthenticatedResponse as GitHubUser,
@ -509,17 +510,20 @@ export default class API {
});
}
async listFiles(path: string, { repoURL = this.repoURL, branch = this.branch } = {}) {
async listFiles(path: string, { repoURL = this.repoURL, branch = this.branch, depth = 1 } = {}) {
const folder = trimStart(path, '/');
return this.request(`${repoURL}/git/trees/${branch}:${folder}`, {
params: { recursive: 10 },
// GitHub API supports recursive=1 for getting the entire recursive tree
// or omitting it to get the non-recursive tree
params: depth > 1 ? { recursive: 1 } : {},
})
.then((res: GitHubTree) =>
res.tree
.filter(file => file.type === 'blob')
// filter only files and up to the required depth
.filter(file => file.type === 'blob' && file.path.split('/').length <= depth)
.map(file => ({
...file,
name: file.path,
name: basename(file.path),
path: `${folder}/${file.path}`,
})),
)

View File

@ -187,7 +187,8 @@ export default class GraphQLAPI extends API {
getAllFiles(entries, path) {
const allFiles = entries.reduce((acc, item) => {
if (item.type === 'tree') {
return [...acc, ...this.getAllFiles(item.object.entries, `${path}/${item.name}`)];
const entries = item.object?.entries || [];
return [...acc, ...this.getAllFiles(entries, `${path}/${item.name}`)];
} else if (item.type === 'blob') {
return [
...acc,
@ -204,10 +205,10 @@ export default class GraphQLAPI extends API {
return allFiles;
}
async listFiles(path, { repoURL = this.repoURL, branch = this.branch } = {}) {
async listFiles(path, { repoURL = this.repoURL, branch = this.branch, depth = 1 } = {}) {
const { owner, name } = this.getOwnerAndNameFromRepoUrl(repoURL);
const { data } = await this.query({
query: queries.files,
query: queries.files(depth),
variables: { owner, name, expression: `${branch}:${path}` },
});

View File

@ -489,4 +489,87 @@ describe('github API', () => {
);
});
});
describe('listFiles', () => {
it('should get files by depth', async () => {
const api = new API({ branch: 'master', repo: 'owner/repo' });
const tree = [
{
path: 'post.md',
type: 'blob',
},
{
path: 'dir1',
type: 'tree',
},
{
path: 'dir1/nested-post.md',
type: 'blob',
},
{
path: 'dir1/dir2',
type: 'tree',
},
{
path: 'dir1/dir2/nested-post.md',
type: 'blob',
},
];
api.request = jest.fn().mockResolvedValue({ tree });
await expect(api.listFiles('posts', { depth: 1 })).resolves.toEqual([
{
path: 'posts/post.md',
type: 'blob',
name: 'post.md',
},
]);
expect(api.request).toHaveBeenCalledTimes(1);
expect(api.request).toHaveBeenCalledWith('/repos/owner/repo/git/trees/master:posts', {
params: {},
});
jest.clearAllMocks();
await expect(api.listFiles('posts', { depth: 2 })).resolves.toEqual([
{
path: 'posts/post.md',
type: 'blob',
name: 'post.md',
},
{
path: 'posts/dir1/nested-post.md',
type: 'blob',
name: 'nested-post.md',
},
]);
expect(api.request).toHaveBeenCalledTimes(1);
expect(api.request).toHaveBeenCalledWith('/repos/owner/repo/git/trees/master:posts', {
params: { recursive: 1 },
});
jest.clearAllMocks();
await expect(api.listFiles('posts', { depth: 3 })).resolves.toEqual([
{
path: 'posts/post.md',
type: 'blob',
name: 'post.md',
},
{
path: 'posts/dir1/nested-post.md',
type: 'blob',
name: 'nested-post.md',
},
{
path: 'posts/dir1/dir2/nested-post.md',
type: 'blob',
name: 'nested-post.md',
},
]);
expect(api.request).toHaveBeenCalledTimes(1);
expect(api.request).toHaveBeenCalledWith('/repos/owner/repo/git/trees/master:posts', {
params: { recursive: 1 },
});
});
});
});

View File

@ -2,7 +2,7 @@ import React from 'react';
import trimStart from 'lodash/trimStart';
import semaphore from 'semaphore';
import { stripIndent } from 'common-tags';
import { asyncLock, basename } from 'netlify-cms-lib-util';
import { asyncLock, basename, getCollectionDepth } from 'netlify-cms-lib-util';
import AuthenticationPage from './AuthenticationPage';
import { get } from 'lodash';
import API from './API';
@ -256,7 +256,10 @@ export default class GitHub {
async entriesByFolder(collection, extension) {
const repoURL = this.useOpenAuthoring ? this.api.originRepoURL : this.api.repoURL;
const files = await this.api.listFiles(collection.get('folder'), { repoURL });
const files = await this.api.listFiles(collection.get('folder'), {
repoURL,
depth: getCollectionDepth(collection),
});
const filteredFiles = files.filter(file => file.name.endsWith('.' + extension));
return this.fetchFiles(filteredFiles, { repoURL });
}

View File

@ -93,7 +93,7 @@ export const statues = gql`
${fragments.object}
`;
const buildFilesQuery = (depth = 10) => {
const buildFilesQuery = (depth = 1) => {
const PLACE_HOLDER = 'PLACE_HOLDER';
let query = oneLine`
...ObjectParts
@ -126,14 +126,12 @@ const buildFilesQuery = (depth = 10) => {
return query;
};
const filesQuery = buildFilesQuery();
export const files = gql`
export const files = depth => gql`
query files($owner: String!, $name: String!, $expression: String!) {
repository(owner: $owner, name: $name) {
...RepositoryParts
object(expression: $expression) {
${filesQuery}
${buildFilesQuery(depth)}
}
}
}

View File

@ -187,10 +187,10 @@ export default class API {
// while the CMS defaults to sorting by filename _ascending_, at
// least in the current GitHub backend). This should eventually be
// refactored.
listFiles = async path => {
listFiles = async (path, recursive = false) => {
const firstPageCursor = await this.fetchCursor({
url: `${this.repoURL}/repository/tree`,
params: { path, ref: this.branch, recursive: true },
params: { path, ref: this.branch, recursive },
});
const lastPageLink = firstPageCursor.data.getIn(['links', 'last']);
const { entries, cursor } = await this.fetchCursorAndEntries(lastPageLink);
@ -209,12 +209,12 @@ export default class API {
};
};
listAllFiles = async path => {
listAllFiles = async (path, recursive = false) => {
const entries = [];
let { cursor, entries: initialEntries } = await this.fetchCursorAndEntries({
url: `${this.repoURL}/repository/tree`,
// Get the maximum number of entries per page
params: { path, ref: this.branch, per_page: 100 },
params: { path, ref: this.branch, per_page: 100, recursive },
});
entries.push(...initialEntries);
while (cursor && cursor.actions.has('next')) {

View File

@ -484,6 +484,34 @@ describe('gitlab backend', () => {
});
});
describe('filterFile', () => {
it('should return true for nested file with matching depth', () => {
backend = resolveBackend(defaultConfig);
expect(
backend.implementation.filterFile(
'content/posts',
{ name: 'index.md', path: 'content/posts/dir1/dir2/index.md' },
'md',
3,
),
).toBe(true);
});
it('should return false for nested file with non matching depth', () => {
backend = resolveBackend(defaultConfig);
expect(
backend.implementation.filterFile(
'content/posts',
{ name: 'index.md', path: 'content/posts/dir1/dir2/index.md' },
'md',
2,
),
).toBe(false);
});
});
afterEach(() => {
nock.cleanAll();
authStore.logout();

View File

@ -1,7 +1,8 @@
import trimStart from 'lodash/trimStart';
import semaphore from 'semaphore';
import { trim } from 'lodash';
import { stripIndent } from 'common-tags';
import { CURSOR_COMPATIBILITY_SYMBOL, basename } from 'netlify-cms-lib-util';
import { CURSOR_COMPATIBILITY_SYMBOL, basename, getCollectionDepth } from 'netlify-cms-lib-util';
import AuthenticationPage from './AuthenticationPage';
import API from './API';
@ -78,9 +79,17 @@ export default class GitLab {
return Promise.resolve(this.token);
}
filterFile(folder, file, extension, depth) {
// gitlab paths include the root folder
const fileFolder = trim(file.path.split(folder)[1] || '/', '/');
return file.name.endsWith('.' + extension) && fileFolder.split('/').length <= depth;
}
entriesByFolder(collection, extension) {
return this.api.listFiles(collection.get('folder')).then(({ files, cursor }) =>
this.fetchFiles(files.filter(file => file.name.endsWith('.' + extension))).then(
const depth = getCollectionDepth(collection);
const folder = collection.get('folder');
return this.api.listFiles(folder, depth > 1).then(({ files, cursor }) =>
this.fetchFiles(files.filter(file => this.filterFile(folder, file, extension, depth))).then(
fetchedFiles => {
const returnedFiles = fetchedFiles;
returnedFiles[CURSOR_COMPATIBILITY_SYMBOL] = cursor;
@ -91,9 +100,13 @@ export default class GitLab {
}
allEntriesByFolder(collection, extension) {
const depth = getCollectionDepth(collection);
const folder = collection.get('folder');
return this.api
.listAllFiles(collection.get('folder'))
.then(files => this.fetchFiles(files.filter(file => file.name.endsWith('.' + extension))));
.listAllFiles(folder, depth > 1)
.then(files =>
this.fetchFiles(files.filter(file => this.filterFile(folder, file, extension, depth))),
);
}
entriesByFiles(collection) {

View File

@ -1,4 +1,4 @@
import TestBackend from '../implementation';
import TestBackend, { getFolderEntries } from '../implementation';
describe('test backend implementation', () => {
beforeEach(() => {
@ -201,4 +201,57 @@ describe('test backend implementation', () => {
});
});
});
describe('getFolderEntries', () => {
it('should get files by depth', () => {
const tree = {
pages: {
'root-page.md': {
content: 'root page content',
},
dir1: {
'nested-page-1.md': {
content: 'nested page 1 content',
},
dir2: {
'nested-page-2.md': {
content: 'nested page 2 content',
},
},
},
},
};
expect(getFolderEntries(tree, 'pages', 'md', 1)).toEqual([
{
file: { path: 'pages/root-page.md' },
data: 'root page content',
},
]);
expect(getFolderEntries(tree, 'pages', 'md', 2)).toEqual([
{
file: { path: 'pages/dir1/nested-page-1.md' },
data: 'nested page 1 content',
},
{
file: { path: 'pages/root-page.md' },
data: 'root page content',
},
]);
expect(getFolderEntries(tree, 'pages', 'md', 3)).toEqual([
{
file: { path: 'pages/dir1/dir2/nested-page-2.md' },
data: 'nested page 2 content',
},
{
file: { path: 'pages/dir1/nested-page-1.md' },
data: 'nested page 1 content',
},
{
file: { path: 'pages/root-page.md' },
data: 'root page content',
},
]);
});
});
});

View File

@ -5,6 +5,7 @@ import {
Cursor,
CURSOR_COMPATIBILITY_SYMBOL,
basename,
getCollectionDepth,
} from 'netlify-cms-lib-util';
import AuthenticationPage from './AuthenticationPage';
@ -35,14 +36,25 @@ const getCursor = (collection, extension, entries, index) => {
});
};
const getFolderEntries = (folder, extension) => {
return Object.keys(window.repoFiles[folder] || {})
.filter(path => path.endsWith(`.${extension}`))
.map(path => ({
file: { path: `${folder}/${path}` },
data: window.repoFiles[folder][path].content,
}))
.reverse();
export const getFolderEntries = (tree, folder, extension, depth, files = [], path = folder) => {
if (depth <= 0) {
return files;
}
Object.keys(tree[folder] || {}).forEach(key => {
if (key.endsWith(`.${extension}`)) {
const file = tree[folder][key];
files.unshift({
file: { path: `${path}/${key}` },
data: file.content,
});
} else {
const subTree = tree[folder];
return getFolderEntries(subTree, key, extension, depth - 1, files, `${path}/${key}`);
}
});
return files;
};
export default class TestBackend {
@ -89,7 +101,13 @@ export default class TestBackend {
}
})();
// TODO: stop assuming cursors are for collections
const allEntries = getFolderEntries(collection.get('folder'), extension);
const depth = getCollectionDepth(collection);
const allEntries = getFolderEntries(
window.repoFiles,
collection.get('folder'),
extension,
depth,
);
const entries = allEntries.slice(newIndex * pageSize, newIndex * pageSize + pageSize);
const newCursor = getCursor(collection, extension, allEntries, newIndex);
return Promise.resolve({ entries, cursor: newCursor });
@ -97,7 +115,8 @@ export default class TestBackend {
entriesByFolder(collection, extension) {
const folder = collection.get('folder');
const entries = folder ? getFolderEntries(folder, extension) : [];
const depth = getCollectionDepth(collection);
const entries = folder ? getFolderEntries(window.repoFiles, folder, extension, depth) : [];
const cursor = getCursor(collection, extension, entries, 0);
const ret = take(entries, pageSize);
ret[CURSOR_COMPATIBILITY_SYMBOL] = cursor;

View File

@ -1,5 +1,6 @@
import { parseLinkHeader, getAllResponses } from '../backendUtil';
import { parseLinkHeader, getAllResponses, getCollectionDepth } from '../backendUtil';
import { oneLine } from 'common-tags';
import { Map } from 'immutable';
import nock from 'nock';
describe('parseLinkHeader', () => {
@ -69,3 +70,13 @@ describe('getAllResponses', () => {
expect(pages[2]).toHaveLength(10);
});
});
describe('getCollectionDepth', () => {
it('should return 1 for collection with no path', () => {
expect(getCollectionDepth(Map({}))).toBe(1);
});
it('should return 2 for collection with path of one nested folder', () => {
expect(getCollectionDepth(Map({ path: '{{year}}/{{slug}}' }))).toBe(2);
});
});

View File

@ -77,3 +77,8 @@ export const getAllResponses = async (url, options = {}, linkHeaderRelName = 'ne
return pageResponses;
};
export const getCollectionDepth = collection => {
const depth = collection.get('path', '').split('/').length;
return depth;
};

View File

@ -18,6 +18,7 @@ import {
parseLinkHeader,
parseResponse,
responseParser,
getCollectionDepth,
} from './backendUtil';
import loadScript from './loadScript';
import getBlobSHA from './getBlobSHA';
@ -46,6 +47,7 @@ export const NetlifyCmsLibUtil = {
responseParser,
loadScript,
getBlobSHA,
getCollectionDepth,
};
export {
APIError,
@ -73,4 +75,5 @@ export {
getBlobSHA,
asyncLock,
isAbsolutePath,
getCollectionDepth,
};