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

bump github-api to support new teams api #541

Merged
merged 6 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<java.level>8</java.level>
<jenkins.version>2.323</jenkins.version>
<useBeta>true</useBeta>
<!-- TODO remove jth override when we bump the parent version -->
<jenkins-test-harness.version>1706.v5257fc59612a_</jenkins-test-harness.version>
</properties>

<scm>
Expand All @@ -39,7 +41,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>github-api</artifactId>
<version>1.122</version>
<version>1.303-400.v35c2d8258028</version>
</dependency>
<dependency>
<groupId>com.coravy.hudson.plugins.github</groupId>
Expand Down Expand Up @@ -122,7 +124,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.289.x</artifactId>
<version>1090.v0a_33df40457a_</version>
<version>1280.vd669827e38cd</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
1 change: 0 additions & 1 deletion src/test/resources/api/__files/body-(root)-XwEI7.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"current_user_repositories_url": "https://api.github.com/user/repos{?type,page,per_page,sort}",
"starred_url": "https://api.github.com/user/starred{/owner}{/repo}",
"starred_gists_url": "https://api.github.com/gists/starred",
"team_url": "https://api.github.com/teams",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer in the root response as this no longer exists

"user_url": "https://api.github.com/users/{user}",
"user_organizations_url": "https://api.github.com/user/orgs",
"user_repositories_url": "https://api.github.com/users/{user}/repos{?type,page,per_page,sort}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"url": "https://api.github.com/organizations/4181899/team/1/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to reflects its actual location...

"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"members_url": "https://api.github.com/organizations/4181899/team/1/members{/member}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to new endpoints

"repositories_url": "https://api.github.com/organizations/4181899/teams/1/repos",
"parent": null
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"request" : {
"url" : "/teams/1/repos?per_page=100",
"url" : "/organizations/4181899/team/1/repos?per_page=100",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"method" : "GET"
},
"response" : {
"status" : 301,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks to have been wrong from the outset and was shown by a fix in the updated client.

checked https://api.github.com/repos/jenkinsci/jenkins/contents/?ref=b9fcd2ae02752e7a74e9ca4886e490e435a1ff03 and a few others to show that they do not show redirects and a body (the header did not even have a Location so a 301 would be very unusual and would look like a bug)

"status" : 200,
"bodyFileName" : "body-contents-fu-nMBRw.json",
"headers" : {
"Date" : "Wed, 24 Apr 2019 07:12:07 GMT",
"Content-Type" : "application/json; charset=utf-8",
"Server" : "GitHub.com",
"Status" : "301 Moved Permanently",
"Status" : "200 OK",
"X-RateLimit-Limit" : "60",
"X-RateLimit-Remaining" : "59",
"X-RateLimit-Reset" : "1556093527",
Expand All @@ -29,4 +29,4 @@
"X-GitHub-Request-Id" : "C1B8:23BE:6A64B8:8175F2:5CC00C46"
}
}
}
}