You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`githubUrl`| The GitHub Enterprise endpoint. |`GH_URL` or `GITHUB_URL` environment variable. |
85
-
|`githubApiPathPrefix`| The GitHub Enterprise API prefix. |`GH_PREFIX` or `GITHUB_PREFIX` environment variable. |
86
-
|`proxy`| The proxy to use to access the GitHub API. Set to `false` to disable usage of proxy. See [proxy](#proxy). |`HTTP_PROXY` environment variable. |
87
-
|`assets`| An array of files to upload to the release. See [assets](#assets). | - |
88
-
|`successComment`| The comment to add to each issue and pull request resolved by the release. Set to `false` to disable commenting on issues and pull requests. See [successComment](#successcomment). |`:tada: This issue has been resolved in version ${nextRelease.version} :tada:\n\nThe release is available on [GitHub release](<github_release_url>)`|
89
-
|`failComment`| The content of the issue created when a release fails. Set to `false` to disable opening an issue when a release fails. See [failComment](#failcomment). | Friendly message with links to **semantic-release** documentation and support, with the list of errors that caused the release to fail. |
90
-
|`failTitle`| The title of the issue created when a release fails. Set to `false` to disable opening an issue when a release fails. |`The automated release is failing 🚨`|
91
-
|`labels`| The [labels](https://help.github.com/articles/about-labels) to add to the issue created when a release fails. Set to `false` to not add any label. |`['semantic-release']`|
92
-
|`assignees`| The [assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users) to add to the issue created when a release fails. | - |
93
-
|`releasedLabels`| The [labels](https://help.github.com/articles/about-labels) to add to each issue and pull request resolved by the release. Set to `false` to not add any label. See [releasedLabels](#releasedlabels). |`['released<%= nextRelease.channel ? \` on @\${nextRelease.channel}\` : "" %>']- |
94
-
|`addReleases`| Will add release links to the GitHub Release. Can be `false`, `"bottom"` or `"top"`. See [addReleases](#addReleases). |`false`|
95
-
|`draftRelease`| A boolean indicating if a GitHub Draft Release should be created instead of publishing an actual GitHub Release. |`false`|
96
-
|`releaseNameTemplate`| A [Lodash template](https://lodash.com/docs#template) to customize the github release's name |`<%= nextverison.name %>`|
97
-
|`releaseBodyTemplate`| A [Lodash template](https://lodash.com/docs#template) to customize the github release's body |`<%= nextverison.notes %>`|
|`githubUrl`| The GitHub Enterprise endpoint. |`GH_URL` or `GITHUB_URL` environment variable. |
85
+
|`githubApiPathPrefix`| The GitHub Enterprise API prefix. |`GH_PREFIX` or `GITHUB_PREFIX` environment variable. |
86
+
|`proxy`| The proxy to use to access the GitHub API. Set to `false` to disable usage of proxy. See [proxy](#proxy). |`HTTP_PROXY` environment variable. |
87
+
|`assets`| An array of files to upload to the release. See [assets](#assets). | - |
88
+
|`successComment`| The comment to add to each issue and pull request resolved by the release. Set to `false` to disable commenting on issues and pull requests. See [successComment](#successcomment). |`:tada: This issue has been resolved in version ${nextRelease.version} :tada:\n\nThe release is available on [GitHub release](<github_release_url>)`|
89
+
|`failComment`| The content of the issue created when a release fails. Set to `false` to disable opening an issue when a release fails. See [failComment](#failcomment). | Friendly message with links to **semantic-release** documentation and support, with the list of errors that caused the release to fail. |
90
+
|`failTitle`| The title of the issue created when a release fails. Set to `false` to disable opening an issue when a release fails. |`The automated release is failing 🚨`|
91
+
|`labels`| The [labels](https://help.github.com/articles/about-labels) to add to the issue created when a release fails. Set to `false` to not add any label. |`['semantic-release']`|
92
+
|`assignees`| The [assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users) to add to the issue created when a release fails. | - |
93
+
|`releasedLabels`| The [labels](https://help.github.com/articles/about-labels) to add to each issue and pull request resolved by the release. Set to `false` to not add any label. See [releasedLabels](#releasedlabels). |`['released<%= nextRelease.channel ? \` on @\${nextRelease.channel}\` : "" %>']- |
94
+
|`addReleases`| Will add release links to the GitHub Release. Can be `false`, `"bottom"` or `"top"`. See [addReleases](#addReleases). |`false`|
95
+
|`draftRelease`| A boolean indicating if a GitHub Draft Release should be created instead of publishing an actual GitHub Release. |`false`|
96
+
|`releaseNameTemplate`| A [Lodash template](https://lodash.com/docs#template) to customize the github release's name |`<%= nextverison.name %>`|
97
+
|`releaseBodyTemplate`| A [Lodash template](https://lodash.com/docs#template) to customize the github release's body |`<%= nextverison.notes %>`|
98
+
|`discussionCategoryName`| The category name in which to create a linked discussion to the release. Set to `false` to disable creating discussion for a release. |`false`|
Copy file name to clipboardexpand all lines: index.js
+5-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ export async function verifyConditions(
17
17
{ Octokit =SemanticReleaseOctokit}={},
18
18
){
19
19
const{ options }=context;
20
-
// If the GitHub publish plugin is used and has `assets`, `successComment`, `failComment`, `failTitle`, `labels` or `assignees` configured, validate it now in order to prevent any release if the configuration is wrong
20
+
// If the GitHub publish plugin is used and has `assets`, `successComment`, `failComment`, `failTitle`, `labels`, `discussionCategoryName` or `assignees` configured, validate it now in order to prevent any release if the configuration is wrong
21
21
if(options.publish){
22
22
constpublishPlugin=
23
23
castArray(options.publish).find(
@@ -42,6 +42,10 @@ export async function verifyConditions(
test('Verify package, token and repository access with "proxy", "asset", "successComment", "failTitle", "failComment" and "label" set to "null"',async(t)=>{
65
+
test('Verify package, token and repository access with "proxy", "asset", "discussionCategoryName", "successComment", "failTitle", "failComment" and "label" set to "null"',async(t)=>{
57
66
constowner="test_user";
58
67
constrepo="test_repo";
59
68
constenv={GH_TOKEN: "github_token"};
@@ -63,6 +72,7 @@ test('Verify package, token and repository access with "proxy", "asset", "succes
63
72
constfailTitle=null;
64
73
constfailComment=null;
65
74
constlabels=null;
75
+
constdiscussionCategoryName=null;
66
76
67
77
constfetch=fetchMock
68
78
.sandbox()
@@ -72,7 +82,15 @@ test('Verify package, token and repository access with "proxy", "asset", "succes
0 commit comments