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
- Open or update a GitHub issue with informations about the errors that caused the release to fail
- Update the `success` hook to close the issue when a release is successful
|`githubUrl`| The GitHub Enterprise endpoint. |`GH_URL` or `GITHUB_URL` environment variable. |
48
-
|`githubApiPathPrefix`| The GitHub Enterprise API prefix. |`GH_PREFIX` or `GITHUB_PREFIX` environment variable. |
49
-
|`assets`| An array of files to upload to the release. See [assets](#assets). | - |
50
-
|`successComment`| The comment added to each issue and pull request resolved by the release. 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>)`|
|`githubUrl`| The GitHub Enterprise endpoint. |`GH_URL` or `GITHUB_URL` environment variable. |
52
+
|`githubApiPathPrefix`| The GitHub Enterprise API prefix. |`GH_PREFIX` or `GITHUB_PREFIX` environment variable. |
53
+
|`assets`| An array of files to upload to the release. See [assets](#assets). | - |
54
+
|`successComment`| The comment added to each issue and pull request resolved by the release. 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>)`|
55
+
|`failComment`| The content of the issue created 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. |
56
+
|`failTitle`| The title of the issue created when a release fails. |`The automated release is failing :rotating_light:`|
57
+
|`labels`| The [labels](https://help.github.com/articles/about-labels) to add to the issue created when a release fails. |`['semantic-release']`|
58
+
|`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. | - |
51
59
52
60
#### assets
53
61
@@ -102,6 +110,23 @@ The `successComment` `This ${issue.pull_request ? 'pull request' : 'issue'} is i
102
110
103
111
> This pull request is included in version 1.0.0
104
112
113
+
#### failComment
114
+
115
+
The message for the issue content is generated with [Lodash template](https://lodash.com/docs#template). The following variables are available:
|`branch`| The branch from which the release had failed. |
120
+
|`errors`| An `Array` of [SemanticReleaseError](https://github.com/semantic-release/error). Each error has the `message`, `code`, `pluginName` and `details` properties.<br>`pluginName` contains the package name of the plugin that threw the error.<br>`details` contains a informations about the error formatted in markdown. |
121
+
122
+
##### failComment examples
123
+
124
+
The `failComment``This release from branch ${branch} had failed due to the following errors:\n- ${errors.map(err => err.message).join('\\n- ')}` will generate the comment:
125
+
126
+
> This release from branch master had failed due to the following errors:
127
+
> - Error message 1
128
+
> - Error message 2
129
+
105
130
### Usage
106
131
107
132
The plugins are used by default by [Semantic-release](https://github.com/semantic-release/semantic-release) so no
@@ -114,7 +139,8 @@ Each individual plugin can be disabled, replaced or used with other plugins in t
// If the GitHub publish plugin is used and has `assets` configured, validate it now in order to prevent any release if the configuration is wrong
10
+
// 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
`Unfortunatly this error doesn't have any additionnal information.${
11
+
error.pluginName
12
+
? ` Feel free to kindly ask the author of the \`${error.pluginName}\` plugin to add more helpful informations.`
13
+
: ''
14
+
}`}`;
15
+
16
+
module.exports=(
17
+
branch,
18
+
errors
19
+
)=>`## :rotating_light: The automated release from the \`${branch}\` branch failed. :rotating_light:
20
+
21
+
I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
22
+
23
+
You can find below the list of errors reported by **semantic-release**. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.
24
+
25
+
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
26
+
27
+
Once all the errors are resolved, **semantic-release** will release your package the next time you push a commit the \`${branch}\` branch. You can also manually restart the failed CI job that runs **semantic-release**.
28
+
29
+
If you are not sure how to resolve this, here is some links that can help you:
30
+
- [Usage documentation](${USAGE_DOC_URL})
31
+
- [Frequently Asked Questions](${FAQ_URL})
32
+
- [Support channels](${GET_HELP_URL})
33
+
34
+
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind **[semantic-release](${NEW_ISSUE_URL})**.
35
+
36
+
---
37
+
38
+
${errors.map(formatError).join('\n\n---\n\n')}
39
+
40
+
---
41
+
42
+
Good luck with your project ✨
43
+
44
+
Your **[semantic-release](${HOME_URL})** bot :package::rocket:`;
0 commit comments