openapi_github/models/
repos_generate_release_notes_request.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReposGenerateReleaseNotesRequest {
16    /// The tag name for the release. This can be an existing tag or a new one.
17    #[serde(rename = "tag_name")]
18    pub tag_name: String,
19    /// Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists.
20    #[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")]
21    pub target_commitish: Option<String>,
22    /// The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release.
23    #[serde(rename = "previous_tag_name", skip_serializing_if = "Option::is_none")]
24    pub previous_tag_name: Option<String>,
25    /// Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used.
26    #[serde(rename = "configuration_file_path", skip_serializing_if = "Option::is_none")]
27    pub configuration_file_path: Option<String>,
28}
29
30impl ReposGenerateReleaseNotesRequest {
31    pub fn new(tag_name: String) -> ReposGenerateReleaseNotesRequest {
32        ReposGenerateReleaseNotesRequest {
33            tag_name,
34            target_commitish: None,
35            previous_tag_name: None,
36            configuration_file_path: None,
37        }
38    }
39}
40