java.lang.Object
org.kohsuke.github.GHReleaseBuilder
Builder pattern for creating a
GHRelease
.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Values for whether this release should be the latest. -
Constructor Summary
ConstructorDescriptionGHReleaseBuilder
(GHRepository ghRepository, String tag) Instantiates a new Gh release builder. -
Method Summary
Modifier and TypeMethodDescriptionBody gh release builder.categoryName
(String categoryName) Optional.Specifies the commitish value that determines where the Git tag is created from.create()
Create gh release.draft
(boolean draft) Optional.generateReleaseNotes
(boolean generateReleaseNotes) Optional.Optional.Name gh release builder.prerelease
(boolean prerelease) Optional.
-
Constructor Details
-
GHReleaseBuilder
Instantiates a new Gh release builder.- Parameters:
ghRepository
- the gh repositorytag
- the tag
-
-
Method Details
-
body
Body gh release builder.- Parameters:
body
- The release notes body.- Returns:
- the gh release builder
-
commitish
Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA.- Parameters:
commitish
- Defaults to the repository’s default branch (usually "main"). Unused if the Git tag already exists.- Returns:
- the gh release builder
-
draft
Optional.- Parameters:
draft
-true
to create a draft (unpublished) release,false
to create a published one. Default isfalse
.- Returns:
- the gh release builder
-
name
Name gh release builder.- Parameters:
name
- the name of the release- Returns:
- the gh release builder
-
prerelease
Optional.- Parameters:
prerelease
-true
to identify the release as a prerelease.false
to identify the release as a full release. Default isfalse
.- Returns:
- the gh release builder
-
categoryName
Optional.- Parameters:
categoryName
- the category of the discussion to be created for the release. Category should already exist- Returns:
- the gh release builder
-
generateReleaseNotes
Optional.- Parameters:
generateReleaseNotes
-true
to instruct GitHub to generate release name and notes automatically.false
to suppress automatic generation. Default isfalse
.- Returns:
- the gh release builder
-
makeLatest
Optional.- Parameters:
latest
- Whether to make this the latest release. Default isTRUE
- Returns:
- the gh release builder
-
create
Create gh release.- Returns:
- the gh release
- Throws:
IOException
- the io exception
-