gradle-josm-plugin / org.openstreetmap.josm.gradle.plugin.github / GithubReleasesClient

GithubReleasesClient

class GithubReleasesClient

Constructors

<init>

GithubReleasesClient(github: GithubConfig, apiUrl: String)
GithubReleasesClient(repository: String, user: String, accessToken: String, apiUrl: String)

Properties

accessToken

val accessToken: String

apiUrl

val apiUrl: String

repository

val repository: String

user

val user: String

Functions

createRelease

fun createRelease(tagName: String, targetCommitish: String? = null, name: String? = null, body: String? = null, draft: Boolean = false, prerelease: Boolean = false): JsonObject

Creates a github release with the tag tagName.

deleteReleaseAsset

fun deleteReleaseAsset(assetId: Int): Unit

Deletes the release asset assetId

getLatestRelease

fun getLatestRelease(): JsonObject?

Replies the latest release or null, if no such release exists.

getReleaseAssets

fun getReleaseAssets(releaseId: Int): JsonArray<JsonObject>

Fetch the list of release assets for the release releaseId.

getReleases

fun getReleases(): JsonArray<JsonObject>

Fetches the list of releases

updateRelease

fun updateRelease(releaseId: Int, tagName: String? = null, targetCommitish: String? = null, name: String? = null, body: String? = null, draft: Boolean? = null, prerelease: Boolean? = null): JsonObject

Creates a github release with the tag tagName.

uploadReleaseAsset

fun uploadReleaseAsset(releaseId: Int, file: File, contentType: String, name: String? = null, label: String? = null): JsonObject

Upload a release asset file to the release releaseId. name is the (optional) new name of the uploaded file. label is an (optional) short description for the asset.