Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1446 from maddymanu/public-keys-maddymanu
Adding Secrets + Public Key to Repository
- Loading branch information
Showing
15 changed files
with
889 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/org/kohsuke/github/GHRepositoryPublicKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.kohsuke.github; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
|
||
import java.io.IOException; | ||
import java.net.URL; | ||
|
||
/** | ||
* A public key for the given repository | ||
* | ||
* @author Aditya Bansal | ||
*/ | ||
public class GHRepositoryPublicKey extends GHObject { | ||
// Not provided by the API. | ||
@JsonIgnore | ||
private GHRepository owner; | ||
|
||
private String keyId; | ||
private String key; | ||
|
||
@Override | ||
public URL getHtmlUrl() throws IOException { | ||
return null; | ||
} | ||
|
||
public String getKeyId() { | ||
return keyId; | ||
} | ||
|
||
public String getKey() { | ||
return key; | ||
} | ||
|
||
GHRepositoryPublicKey wrapUp(GHRepository owner) { | ||
this.owner = owner; | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
.../kohsuke/github/GHRepositoryTest/wiremock/createSecret/__files/orgs_hub4j-test-org-2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"login": "hub4j-test-org", | ||
"id": 7544739, | ||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", | ||
"url": "https://api.github.com/orgs/hub4j-test-org", | ||
"repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", | ||
"events_url": "https://api.github.com/orgs/hub4j-test-org/events", | ||
"hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", | ||
"issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", | ||
"members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", | ||
"public_members_url": "https://api.github.com/orgs/hub4j-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/hub4j-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": 147, | ||
"collaborators": 0, | ||
"billing_email": "kk@kohsuke.org", | ||
"default_repository_permission": "none", | ||
"members_can_create_repositories": false, | ||
"two_factor_requirement_enabled": false, | ||
"plan": { | ||
"name": "free", | ||
"space": 976562499, | ||
"private_repos": 0, | ||
"filled_seats": 11, | ||
"seats": 0 | ||
} | ||
} |
Oops, something went wrong.