Struct git_cliff_core::release::Release
source · pub struct Release<'a> {
pub version: Option<String>,
pub commits: Vec<Commit<'a>>,
pub commit_id: Option<String>,
pub timestamp: i64,
pub previous: Option<Box<Release<'a>>>,
pub github: GitHubReleaseMetadata,
}
Expand description
Representation of a release.
Fields§
§version: Option<String>
Release version, git tag.
commits: Vec<Commit<'a>>
Commits made for the release.
commit_id: Option<String>
Commit ID of the tag.
timestamp: i64
Timestamp of the release in seconds, from epoch.
previous: Option<Box<Release<'a>>>
Previous release.
github: GitHubReleaseMetadata
Available on crate feature
github
only.Contributors.
Implementations§
source§impl<'a> Release<'a>
impl<'a> Release<'a>
sourcepub fn update_github_metadata(
&mut self,
github_commits: Vec<GitHubCommit>,
github_pull_requests: Vec<GitHubPullRequest>
) -> Result<()>
Available on crate feature github
only.
pub fn update_github_metadata( &mut self, github_commits: Vec<GitHubCommit>, github_pull_requests: Vec<GitHubPullRequest> ) -> Result<()>
github
only.Updates the GitHub metadata that is contained in the release.
This function takes two arguments:
- GitHub commits: needed for associating the Git user with the GitHub username.
- GitHub pull requests: needed for generating the contributor list for the release.
sourcepub fn calculate_next_version(&self) -> Result<String>
pub fn calculate_next_version(&self) -> Result<String>
Calculates the next version based on the commits.
It uses the default bump version configuration to calculate the next version.
Trait Implementations§
source§impl<'de, 'a> Deserialize<'de> for Release<'a>
impl<'de, 'a> Deserialize<'de> for Release<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> PartialEq for Release<'a>
impl<'a> PartialEq for Release<'a>
impl<'a> StructuralPartialEq for Release<'a>
Auto Trait Implementations§
impl<'a> Freeze for Release<'a>
impl<'a> RefUnwindSafe for Release<'a>
impl<'a> Send for Release<'a>
impl<'a> Sync for Release<'a>
impl<'a> Unpin for Release<'a>
impl<'a> UnwindSafe for Release<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more