Package com.spotify.github.v3.clients
Class GitDataClient
- java.lang.Object
-
- com.spotify.github.v3.clients.GitDataClient
-
public class GitDataClient extends Object
Reference Api client
-
-
Method Summary
-
-
-
Method Detail
-
deleteReference
public CompletableFuture<Void> deleteReference(String ref)
Deletes a git reference.- Parameters:
ref
- search parameters
-
deleteBranch
public CompletableFuture<Void> deleteBranch(String branch)
Deletes a git branch.- Parameters:
branch
- search parameters
-
deleteTag
public CompletableFuture<Void> deleteTag(String tag)
Deletes a git tag.- Parameters:
tag
- search parameters
-
getBranchReference
public CompletableFuture<Reference> getBranchReference(String branch)
Get a git branch reference- Parameters:
branch
- branch name
-
getTagReference
public CompletableFuture<Reference> getTagReference(String tag)
Get a git tag reference.- Parameters:
tag
- tag name
-
getTag
public CompletableFuture<Tag> getTag(String tag)
Get a git annotated tag.- Parameters:
tag
- tag name
-
listMatchingReferences
public CompletableFuture<List<Reference>> listMatchingReferences(String ref)
List matching references.- Parameters:
ref
- reference name
-
listReferences
@Deprecated public CompletableFuture<List<Reference>> listReferences(String ref)
Deprecated.List references. (Replaced by listMatchingReferences for github enterprise version > 2.18)- Parameters:
ref
- reference name
-
listReferences
@Deprecated public CompletableFuture<List<Reference>> listReferences()
Deprecated.List references. (Replaced by listMatchingReferences for github enterprise version > 2.18)
-
createReference
public CompletableFuture<Reference> createReference(String ref, String sha)
Create a git reference.- Parameters:
ref
- reference namesha
- commit to branch from
-
createBranchReference
public CompletableFuture<Reference> createBranchReference(String branch, String sha)
Create a git branch reference. It must not include the refs/heads.- Parameters:
branch
- tag namesha
- commit to branch from
-
createTagReference
public CompletableFuture<Reference> createTagReference(String tag, String sha)
Create a git tag reference. It must not include the refs/tags.- Parameters:
tag
- tag namesha
- commit to tag
-
createAnnotatedTag
public CompletableFuture<Tag> createAnnotatedTag(String tag, String sha, String tagMessage, String taggerName, String taggerEmail)
Create an annotated tag. First it would create a tag reference and then create annotated tag- Parameters:
tag
- tag namesha
- commit to tagtagMessage
- messagetaggerName
- name of the taggertaggerEmail
- email of the tagger
-
createCommit
public CompletableFuture<Commit> createCommit(String message, List<String> parents, String treeSha)
Create a commit which references a tree- Parameters:
message
- commit messageparents
- list of parent sha values, usually just one shatreeSha
- sha value of the tree
-
getTree
public CompletableFuture<Tree> getTree(String sha)
Get a repository tree.- Parameters:
sha
- commit sha- Returns:
- tree
-
getRecursiveTree
public CompletableFuture<Tree> getRecursiveTree(String sha)
Get a repository tree recursively.- Parameters:
sha
- commit sha- Returns:
- tree
-
createTree
public CompletableFuture<Tree> createTree(List<TreeItem> tree, String baseTreeSha)
Set a repository tree.- Parameters:
tree
- list of tree itemsbaseTreeSha
- sha of existing tree used as base for new tree- Returns:
- tree
-
createBlob
public CompletableFuture<ShaLink> createBlob(String content)
Post new content to the server.- Parameters:
content
- the content to be posted
-
-