Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to set repository topics #594

Merged
merged 2 commits into from
Nov 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
@@ -1763,10 +1763,9 @@ public List<String> listTopics() throws IOException {
* Set the topics for this repository.
* See https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository
*/
// This currently returns a "404" error (as of 30 Oct 2019).
// public void setTopics(List<String> topics) throws IOException {
// Requester requester = new Requester(root);
// requester.with("names", topics);
// requester.method("PUT").withPreview(MERCY).to(getApiTailUrl("topics"));
// }
public void setTopics(List<String> topics) throws IOException {
Requester requester = new Requester(root);
requester.with("names", topics);
requester.method("PUT").withPreview(MERCY).to(getApiTailUrl("topics"));
}
}
35 changes: 32 additions & 3 deletions src/test/java/org/kohsuke/github/GHRepositoryTest.java
Original file line number Diff line number Diff line change
@@ -5,8 +5,10 @@

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;
import static org.junit.Assume.assumeFalse;
@@ -270,8 +272,35 @@ public void setMergeOptions() throws IOException {
}

@Test
public void testListTopics() throws Exception {
List<String> topics = getRepository(gitHub).listTopics();
assertTrue(topics.contains("api-test-dummy"));
public void testSetTopics() throws Exception {
GHRepository repo = getRepository(gitHub);

List<String> topics = new ArrayList<>();

topics.add("java");
topics.add("api-test-dummy");
repo.setTopics(topics);
assertThat("Topics retain input order (are not sort when stored)",
repo.listTopics(), contains("java", "api-test-dummy"));

topics = new ArrayList<>();
topics.add("ordered-state");
topics.add("api-test-dummy");
topics.add("java");
repo.setTopics(topics);
assertThat("Topics behave as a set and retain order from previous calls",
repo.listTopics(), contains("java", "api-test-dummy", "ordered-state"));

topics = new ArrayList<>();
topics.add("ordered-state");
topics.add("api-test-dummy");
repo.setTopics(topics);
assertThat("Topics retain order even when some are removed",
repo.listTopics(), contains("api-test-dummy", "ordered-state"));

topics = new ArrayList<>();
repo.setTopics(topics);
assertTrue("Topics can be set to empty",
repo.listTopics().isEmpty());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"login": "github-api-test-org",
"id": 7544739,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
"url": "https://api.github.com/orgs/github-api-test-org",
"repos_url": "https://api.github.com/orgs/github-api-test-org/repos",
"events_url": "https://api.github.com/orgs/github-api-test-org/events",
"hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks",
"issues_url": "https://api.github.com/orgs/github-api-test-org/issues",
"members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}",
"public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}",
"avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
"description": null,
"is_verified": false,
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 10,
"public_gists": 0,
"followers": 0,
"following": 0,
"html_url": "https://github.com/github-api-test-org",
"created_at": "2014-05-10T19:39:11Z",
"updated_at": "2015-04-20T00:42:30Z",
"type": "Organization",
"total_private_repos": 0,
"owned_private_repos": 0,
"private_gists": 0,
"disk_usage": 132,
"collaborators": 0,
"billing_email": "[email protected]",
"default_repository_permission": "none",
"members_can_create_repositories": false,
"two_factor_requirement_enabled": false,
"plan": {
"name": "free",
"space": 976562499,
"private_repos": 0,
"filled_seats": 7,
"seats": 0
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"login": "bitwiseman",
"id": 1958953,
"node_id": "MDQ6VXNlcjE5NTg5NTM=",
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bitwiseman",
"html_url": "https://github.com/bitwiseman",
"followers_url": "https://api.github.com/users/bitwiseman/followers",
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}",
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions",
"organizations_url": "https://api.github.com/users/bitwiseman/orgs",
"repos_url": "https://api.github.com/users/bitwiseman/repos",
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}",
"received_events_url": "https://api.github.com/users/bitwiseman/received_events",
"type": "User",
"site_admin": false,
"name": "Liam Newman",
"company": "Cloudbees, Inc.",
"blog": "",
"location": "Seattle, WA, USA",
"email": "[email protected]",
"hireable": null,
"bio": "https://twitter.com/bitwiseman",
"public_repos": 174,
"public_gists": 7,
"followers": 139,
"following": 9,
"created_at": "2012-07-11T20:38:33Z",
"updated_at": "2019-09-24T19:32:29Z",
"private_gists": 7,
"total_private_repos": 9,
"owned_private_repos": 0,
"disk_usage": 33697,
"collaborators": 0,
"two_factor_authentication": true,
"plan": {
"name": "free",
"space": 976562499,
"collaborators": 0,
"private_repos": 10000
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "0774979f-2840-46c6-ac31-ea9ebea16a15",
"name": "orgs_github-api-test-org",
"request": {
"url": "/orgs/github-api-test-org",
"method": "GET"
},
"response": {
"status": 200,
"bodyFileName": "orgs_github-api-test-org-0774979f-2840-46c6-ac31-ea9ebea16a15.json",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:27 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4934",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"bbee0a14a82ca84871298052e1bcb545\"",
"Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
"X-GitHub-Media-Type": "unknown, github.v3",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDF992:2298B7D:5DC3A95E"
}
},
"uuid": "0774979f-2840-46c6-ac31-ea9ebea16a15",
"persistent": true,
"insertionIndex": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "6396d3b5-36ad-4990-a691-55a3bca11280",
"name": "repos_github-api-test-org_github-api",
"request": {
"url": "/repos/github-api-test-org/github-api",
"method": "GET"
},
"response": {
"status": 200,
"bodyFileName": "repos_github-api-test-org_github-api-6396d3b5-36ad-4990-a691-55a3bca11280.json",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:27 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4933",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"7998c1d58ba95b2e4a1c263537718671\"",
"Last-Modified": "Thu, 07 Nov 2019 05:19:07 GMT",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "unknown, github.v3",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDF99E:2298BA4:5DC3A95F"
}
},
"uuid": "6396d3b5-36ad-4990-a691-55a3bca11280",
"persistent": true,
"insertionIndex": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"id": "d7497474-d02e-4ff8-bd80-d0309cc549ee",
"name": "repos_github-api-test-org_github-api_topics",
"request": {
"url": "/repos/github-api-test-org/github-api/topics",
"method": "PUT",
"bodyPatterns": [
{
"equalToJson": "{\"names\":[]}",
"ignoreArrayOrder": true,
"ignoreExtraElements": true
}
]
},
"response": {
"status": 200,
"body": "{\"names\":[]}",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:30 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4926",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "\"df993ad275c898093787f01e3ed7a555\"",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.mercy-preview; format=json",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDFA26:2298C44:5DC3A961"
}
},
"uuid": "d7497474-d02e-4ff8-bd80-d0309cc549ee",
"persistent": true,
"insertionIndex": 10
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"id": "57a97040-b886-484e-ae11-9274c28a57fa",
"name": "repos_github-api-test-org_github-api_topics",
"request": {
"url": "/repos/github-api-test-org/github-api/topics",
"method": "GET"
},
"response": {
"status": 200,
"body": "{\"names\":[]}",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:30 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4925",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "\"df993ad275c898093787f01e3ed7a555\"",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.mercy-preview; format=json",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDFA4D:2298C66:5DC3A962"
}
},
"uuid": "57a97040-b886-484e-ae11-9274c28a57fa",
"persistent": true,
"scenarioName": "scenario-1-repos-github-api-test-org-github-api-topics",
"requiredScenarioState": "scenario-1-repos-github-api-test-org-github-api-topics-4",
"insertionIndex": 11
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"id": "e6442e95-3680-401a-a9e9-722c7cff3a8c",
"name": "repos_github-api-test-org_github-api_topics",
"request": {
"url": "/repos/github-api-test-org/github-api/topics",
"method": "PUT",
"bodyPatterns": [
{
"equalToJson": "{\"names\":[\"java\",\"api-test-dummy\"]}",
"ignoreArrayOrder": true,
"ignoreExtraElements": true
}
]
},
"response": {
"status": 200,
"body": "{\"names\":[\"java\",\"api-test-dummy\"]}",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:27 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4932",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"ea65e8cf500f844d9fc218733c1732b8\"",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.mercy-preview; format=json",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDF9AA:2298BB0:5DC3A95F"
}
},
"uuid": "e6442e95-3680-401a-a9e9-722c7cff3a8c",
"persistent": true,
"insertionIndex": 4
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"id": "2dc36e0e-a168-491c-a8f5-4c118c78babd",
"name": "repos_github-api-test-org_github-api_topics",
"request": {
"url": "/repos/github-api-test-org/github-api/topics",
"method": "GET"
},
"response": {
"status": 200,
"body": "{\"names\":[\"java\",\"api-test-dummy\"]}",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:28 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4931",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"ea65e8cf500f844d9fc218733c1732b8\"",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.mercy-preview; format=json",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDF9BE:2298BC5:5DC3A95F"
}
},
"uuid": "2dc36e0e-a168-491c-a8f5-4c118c78babd",
"persistent": true,
"scenarioName": "scenario-1-repos-github-api-test-org-github-api-topics",
"requiredScenarioState": "Started",
"newScenarioState": "scenario-1-repos-github-api-test-org-github-api-topics-2",
"insertionIndex": 5
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"id": "83a58ffe-c7c7-40f7-9799-0690e352466f",
"name": "repos_github-api-test-org_github-api_topics",
"request": {
"url": "/repos/github-api-test-org/github-api/topics",
"method": "PUT",
"bodyPatterns": [
{
"equalToJson": "{\"names\":[\"ordered-state\",\"api-test-dummy\",\"java\"]}",
"ignoreArrayOrder": true,
"ignoreExtraElements": true
}
]
},
"response": {
"status": 200,
"body": "{\"names\":[\"java\",\"api-test-dummy\",\"ordered-state\"]}",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:28 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4930",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"a917b5929ad915f6d77f47f9626ee739\"",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.mercy-preview; format=json",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDF9CB:2298BD7:5DC3A960"
}
},
"uuid": "83a58ffe-c7c7-40f7-9799-0690e352466f",
"persistent": true,
"insertionIndex": 6
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"id": "eed8467b-8135-4bb0-aa71-e4c7f6c38edc",
"name": "repos_github-api-test-org_github-api_topics",
"request": {
"url": "/repos/github-api-test-org/github-api/topics",
"method": "GET"
},
"response": {
"status": 200,
"body": "{\"names\":[\"java\",\"api-test-dummy\",\"ordered-state\"]}",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:28 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4929",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"a917b5929ad915f6d77f47f9626ee739\"",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.mercy-preview; format=json",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDF9E1:2298BF2:5DC3A960"
}
},
"uuid": "eed8467b-8135-4bb0-aa71-e4c7f6c38edc",
"persistent": true,
"scenarioName": "scenario-1-repos-github-api-test-org-github-api-topics",
"requiredScenarioState": "scenario-1-repos-github-api-test-org-github-api-topics-2",
"newScenarioState": "scenario-1-repos-github-api-test-org-github-api-topics-3",
"insertionIndex": 7
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"id": "df3c075d-0311-4a33-bbc5-bb9146c0eb8c",
"name": "repos_github-api-test-org_github-api_topics",
"request": {
"url": "/repos/github-api-test-org/github-api/topics",
"method": "PUT",
"bodyPatterns": [
{
"equalToJson": "{\"names\":[\"ordered-state\",\"api-test-dummy\"]}",
"ignoreArrayOrder": true,
"ignoreExtraElements": true
}
]
},
"response": {
"status": 200,
"body": "{\"names\":[\"api-test-dummy\",\"ordered-state\"]}",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:29 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4928",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"7cf11892f99547fa0b0870388bfd00f7\"",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.mercy-preview; format=json",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDF9F0:2298C05:5DC3A960"
}
},
"uuid": "df3c075d-0311-4a33-bbc5-bb9146c0eb8c",
"persistent": true,
"insertionIndex": 8
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"id": "6159ab53-1522-4d89-933a-734578f4481a",
"name": "repos_github-api-test-org_github-api_topics",
"request": {
"url": "/repos/github-api-test-org/github-api/topics",
"method": "GET"
},
"response": {
"status": 200,
"body": "{\"names\":[\"api-test-dummy\",\"ordered-state\"]}",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:29 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4927",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"7cf11892f99547fa0b0870388bfd00f7\"",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.mercy-preview; format=json",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDFA1A:2298C33:5DC3A961"
}
},
"uuid": "6159ab53-1522-4d89-933a-734578f4481a",
"persistent": true,
"scenarioName": "scenario-1-repos-github-api-test-org-github-api-topics",
"requiredScenarioState": "scenario-1-repos-github-api-test-org-github-api-topics-3",
"newScenarioState": "scenario-1-repos-github-api-test-org-github-api-topics-4",
"insertionIndex": 9
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "489e213c-810a-407d-b9aa-f7b00cdc8995",
"name": "user",
"request": {
"url": "/user",
"method": "GET"
},
"response": {
"status": 200,
"bodyFileName": "user-489e213c-810a-407d-b9aa-f7b00cdc8995.json",
"headers": {
"Date": "Thu, 07 Nov 2019 05:19:26 GMT",
"Content-Type": "application/json; charset=utf-8",
"Server": "GitHub.com",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4936",
"X-RateLimit-Reset": "1573107045",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding"
],
"ETag": "W/\"a789c1045b95bcbfa3f1d935ffbc801c\"",
"Last-Modified": "Tue, 24 Sep 2019 19:32:29 GMT",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion",
"X-Accepted-OAuth-Scopes": "",
"X-GitHub-Media-Type": "unknown, github.v3",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Frame-Options": "deny",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
"X-GitHub-Request-Id": "EE66:9B40:1DDF971:2298B77:5DC3A95E"
}
},
"uuid": "489e213c-810a-407d-b9aa-f7b00cdc8995",
"persistent": true,
"insertionIndex": 1
}