mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
[feat] Introduce NewRelease.DiscussionCategoryName, Fixes #2746
Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
This commit is contained in:
@@ -73,6 +73,15 @@ namespace Octokit
|
||||
/// </value>
|
||||
public bool Prerelease { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If specified, a discussion of the specified category is created and linked to the release.
|
||||
/// The value must be a category that already exists in the repository.
|
||||
/// <value>
|
||||
/// The discussion category name.
|
||||
/// </value>
|
||||
/// </summary>
|
||||
public string DiscussionCategoryName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to automatically generate the name and body for this release.
|
||||
/// If <see cref="Name">name</see> is specified, the specified name will be used; otherwise, a name will
|
||||
|
||||
@@ -55,6 +55,18 @@ newRelease.GenerateReleaseNotes = true; // Set for Name and Body to be generated
|
||||
newRelease.TargetCommitish = "main"; // Optional, can be a branch, tag, or SHA; defaults to the main branch.
|
||||
```
|
||||
|
||||
### Generate a discussion
|
||||
|
||||
Using the `DiscussionCategoryName`, it's possible to create a discussion linked to the upcoming release.
|
||||
The value must be a category that already exists in the repository.
|
||||
For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)."
|
||||
|
||||
```csharp
|
||||
var newTag = "v1.5.7";
|
||||
var newRelease = new NewRelease(newTag);
|
||||
newRelease.DiscussionCategoryName = "Announcements";
|
||||
```
|
||||
|
||||
#### Customizing generated notes
|
||||
```csharp
|
||||
var newTag = "v1.5.7";
|
||||
|
||||
Reference in New Issue
Block a user