Provides auxiliary functions to work with repositories via github api.
Provides auxiliary functions to work with repositories via github api.
(clone client org repo)
(clone client org repo ref)
Download github repository and put its content on a temporary dir. Returns the path of the temporary dir.
For details about the parameters and response format, look at https://docs.github.com/en/rest/reference/repos#download-a-repository-archive-zip.
Download github repository and put its content on a temporary dir. Returns the path of the temporary dir. For details about the parameters and response format, look at https://docs.github.com/en/rest/reference/repos#download-a-repository-archive-zip.
(commit! client org repo base-revision {:keys [message tree]})
Auxiliary function that combines the creation of a tree and a commit. Returns the information of the new commit.
Auxiliary function that combines the creation of a tree and a commit. Returns the information of the new commit.
(create-blob! client org repo body)
Creates a new blob object.
For details about the parameters and response format, look at https://docs.github.com/en/rest/git/blobs#create-a-blob
Creates a new blob object. For details about the parameters and response format, look at https://docs.github.com/en/rest/git/blobs#create-a-blob
(create-commit! client org repo params)
Creates a new commit.
Look at https://developer.github.com/v3/git/commits/#create-a-commit for details about the parameters and response format.
Creates a new commit. Look at https://developer.github.com/v3/git/commits/#create-a-commit for details about the parameters and response format.
(create-org-repository! client org params)
Creates a new github repository.
This function supports using the visibility
and is-template
, params by automatically setting the appropriate Accept
header.
For details about the parameters, response format, and preview headers, look at https://docs.github.com/en/rest/reference/repos#create-an-organization-repository.
Creates a new github repository. This function supports using the `visibility` and `is-template`, params by automatically setting the appropriate `Accept` header. For details about the parameters, response format, and preview headers, look at https://docs.github.com/en/rest/reference/repos#create-an-organization-repository.
(create-reference! client org repo params)
Creates a new reference.
Look at https://developer.github.com/v3/git/refs/#create-a-reference for details about the parameters and response format.
Note that the ref
attribute inside params should be in the format "heads/<branch>" or "tags/<tag>".
This function will do the transformation to the format expected by the api.
Creates a new reference. Look at https://developer.github.com/v3/git/refs/#create-a-reference for details about the parameters and response format. Note that the `ref` attribute inside params should be in the format "heads/<branch>" or "tags/<tag>". This function will do the transformation to the format expected by the api.
(create-tree! client org repo params)
Creates a new tree.
Look at https://developer.github.com/v3/git/trees/#create-a-tree for details about the parameters and response format
Creates a new tree. Look at https://developer.github.com/v3/git/trees/#create-a-tree for details about the parameters and response format
(delete-reference! client org repo ref)
Deletes a reference.
The ref
parameter should be in the format "heads/<branch>" or "tags/<tag>".
Look at https://developer.github.com/v3/git/refs/#delete-a-reference for details about the parameters and response format.
Deletes a reference. The `ref` parameter should be in the format "heads/<branch>" or "tags/<tag>". Look at https://developer.github.com/v3/git/refs/#delete-a-reference for details about the parameters and response format.
(get-branch! client org repo branch)
Returns information about a branch.
Look at https://developer.github.com/v3/repos/branches/#get-a-branch for details about the response format.
Returns information about a branch. Look at https://developer.github.com/v3/repos/branches/#get-a-branch for details about the response format.
(get-commit! client org repo ref)
Returns information about a commit.
Look at https://developer.github.com/v3/git/commits/#get-a-commit for details about the response format.
Returns information about a commit. Look at https://developer.github.com/v3/git/commits/#get-a-commit for details about the response format.
(get-content! client org repo path)
(get-content! client org repo path {:keys [ref branch]})
Returns the content of a text file from the repository default branch (usually master
).
An optional :ref
parameter can be used to fetch content from a different commit/branch/tag.
If the file does not exist, nil is returned.
Note 1: it currently does not work for directories, symlinks and submodules. Note 2: it only works for text files
Returns the content of a text file from the repository default branch (usually `master`). An optional `:ref` parameter can be used to fetch content from a different commit/branch/tag. If the file does not exist, nil is returned. Note 1: it currently does not work for directories, symlinks and submodules. Note 2: it only works for text files
(get-content-raw! client org repo path)
(get-content-raw! client org repo path {:keys [ref branch]})
Returns the bytes contents of a file from the repository default branch (usually master
).
An optional :ref
parameter can be used to fetch content from a different commit/branch/tag.
If the file does not exist, nil is returned.
Note: only works for blobs.
Returns the bytes contents of a file from the repository default branch (usually `master`). An optional `:ref` parameter can be used to fetch content from a different commit/branch/tag. If the file does not exist, nil is returned. Note: only works for blobs.
(get-contents! client org repo)
(get-contents! client org repo {:keys [ref branch]})
Returns the list of contents of a repository default branch (usually master
).
An optional :ref
parameter can be used to fetch content from a different commit/branch/tag.
Returns the list of contents of a repository default branch (usually `master`). An optional `:ref` parameter can be used to fetch content from a different commit/branch/tag.
(get-reference! client org repo ref)
Returns information about a reference.
The ref
parameter should be in the format "heads/<branch>" or "tags/<tag>".
Look at https://developer.github.com/v3/git/refs/#get-a-reference for details about the reponse format.
Returns information about a reference. The `ref` parameter should be in the format "heads/<branch>" or "tags/<tag>". Look at https://developer.github.com/v3/git/refs/#get-a-reference for details about the reponse format.
(get-repository! client org repo)
Get information from github repository.
For details about the parameters and response format, look at https://docs.github.com/en/rest/reference/repos#get-a-repository.
Get information from github repository. For details about the parameters and response format, look at https://docs.github.com/en/rest/reference/repos#get-a-repository.
(get-tree! client org repo tree-sha)
Returns information about a tree.
Look at https://developer.github.com/v3/git/trees/#get-a-tree for details about the response format.
Note: it currently does not support the recursive
option.
Returns information about a tree. Look at https://developer.github.com/v3/git/trees/#get-a-tree for details about the response format. Note: it currently does not support the `recursive` option.
(update-reference! client org repo ref params)
Updates a reference.
The ref
parameter should be in the format "heads/<branch>" or "tags/<tag>".
Look at https://developer.github.com/v3/git/refs/#update-a-reference for details about the parameters and response format.
Updates a reference. The `ref` parameter should be in the format "heads/<branch>" or "tags/<tag>". Look at https://developer.github.com/v3/git/refs/#update-a-reference for details about the parameters and response format.
(upsert-permissions! client org team owner repo params)
Add or update team repository permissions.
For details about the parameters and response format, look at https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions.
Add or update team repository permissions. For details about the parameters and response format, look at https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close