Skip to content

Commit

Permalink
fix: rename-repository 301 redirect, account for replication delay wh…
Browse files Browse the repository at this point in the history
…en recording (#399)
  • Loading branch information
gr2m committed Mar 26, 2021
1 parent d8e60af commit 9d59ebd
Show file tree
Hide file tree
Showing 3 changed files with 406 additions and 296 deletions.
131 changes: 86 additions & 45 deletions scenarios/api.github.com/rename-repository/normalized-fixture.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,53 @@
"method": "get",
"path": "/repos/octokit-fixture-org/rename-repository",
"body": "",
"status": 301,
"response": {
"message": "Moved Permanently",
"url": "https://api.github.com/repositories/1000",
"documentation_url": "https://docs.github.com/v3/#http-redirects"
},
"reqheaders": {
"accept": "application/vnd.github.v3+json",
"authorization": "token 0000000000000000000000000000000000000001",
"host": "api.github.com"
},
"responseIsBinary": false,
"headers": {
"access-control-allow-origin": "*",
"access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset",
"connection": "close",
"content-length": "150",
"content-security-policy": "default-src 'none'",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 10 Oct 2017 16:00:00 GMT",
"location": "https://api.github.com/repositories/1000",
"referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
"x-accepted-oauth-scopes": "admin:repo_hook, delete_repo, read:repo_hook, repo, repo:status, repo_deployment, security_events, write:repo_hook",
"x-content-type-options": "nosniff",
"x-frame-options": "deny",
"x-github-media-type": "github.v3; format=json",
"x-github-request-id": "0000:00000:0000000:0000000:00000000",
"x-oauth-scopes": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, workflow",
"x-ratelimit-limit": "5000",
"x-ratelimit-remaining": "4999",
"x-ratelimit-reset": "1507651200000",
"x-ratelimit-used": 1,
"x-xss-protection": "0"
}
},
{
"scope": "https://api.github.com:443",
"method": "get",
"path": "/repositories/1000",
"body": "",
"status": 200,
"response": {
"id": 1000,
"node_id": "MDA6RW50aXR5MQ==",
"name": "rename-repository",
"full_name": "octokit-fixture-org/rename-repository",
"name": "rename-repository-newname",
"full_name": "octokit-fixture-org/rename-repository-newname",
"private": false,
"owner": {
"login": "octokit-fixture-org",
Expand All @@ -191,53 +232,53 @@
"type": "Organization",
"site_admin": false
},
"html_url": "https://github.com/octokit-fixture-org/rename-repository",
"html_url": "https://github.com/octokit-fixture-org/rename-repository-newname",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/octokit-fixture-org/rename-repository",
"forks_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/forks",
"keys_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/teams",
"hooks_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/hooks",
"issue_events_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/issues/events{/number}",
"events_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/events",
"assignees_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/assignees{/user}",
"branches_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/branches{/branch}",
"tags_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/tags",
"blobs_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/statuses/{sha}",
"languages_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/languages",
"stargazers_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/stargazers",
"contributors_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/contributors",
"subscribers_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/subscribers",
"subscription_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/subscription",
"commits_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/contents/{+path}",
"compare_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/merges",
"archive_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/downloads",
"issues_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/issues{/number}",
"pulls_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/pulls{/number}",
"milestones_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/labels{/name}",
"releases_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/releases{/id}",
"deployments_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository/deployments",
"url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname",
"forks_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/forks",
"keys_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/teams",
"hooks_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/hooks",
"issue_events_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/issues/events{/number}",
"events_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/events",
"assignees_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/assignees{/user}",
"branches_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/branches{/branch}",
"tags_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/tags",
"blobs_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/statuses/{sha}",
"languages_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/languages",
"stargazers_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/stargazers",
"contributors_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/contributors",
"subscribers_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/subscribers",
"subscription_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/subscription",
"commits_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/contents/{+path}",
"compare_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/merges",
"archive_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/downloads",
"issues_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/issues{/number}",
"pulls_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/pulls{/number}",
"milestones_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/labels{/name}",
"releases_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/releases{/id}",
"deployments_url": "https://api.github.com/repos/octokit-fixture-org/rename-repository-newname/deployments",
"created_at": "2017-10-10T16:00:00Z",
"updated_at": "2017-10-10T16:00:00Z",
"pushed_at": "2017-10-10T16:00:00Z",
"git_url": "git://github.com/octokit-fixture-org/rename-repository.git",
"ssh_url": "git@github.com:octokit-fixture-org/rename-repository.git",
"clone_url": "https://github.com/octokit-fixture-org/rename-repository.git",
"svn_url": "https://github.com/octokit-fixture-org/rename-repository",
"git_url": "git://github.com/octokit-fixture-org/rename-repository-newname.git",
"ssh_url": "git@github.com:octokit-fixture-org/rename-repository-newname.git",
"clone_url": "https://github.com/octokit-fixture-org/rename-repository-newname.git",
"svn_url": "https://github.com/octokit-fixture-org/rename-repository-newname",
"homepage": null,
"size": 0,
"stargazers_count": 42,
Expand Down Expand Up @@ -298,7 +339,7 @@
"access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset",
"cache-control": "private, max-age=60, s-maxage=60",
"connection": "close",
"content-length": "6957",
"content-length": "7309",
"content-security-policy": "default-src 'none'",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 10 Oct 2017 16:00:00 GMT",
Expand Down

0 comments on commit 9d59ebd

Please sign in to comment.