Skip to content

Commit

Permalink
fix: use emoji in issue title
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg authored and gr2m committed Feb 15, 2018
1 parent 3025e7a commit fbf1246
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Follow the [Creating a personal access token for the command line](https://help.
| `assets` | An array of files to upload to the release. See [assets](#assets). | - |
| `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>)` |
| `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. |
| `failTitle` | The title of the issue created when a release fails. | `The automated release is failing :rotating_light:` |
| `failTitle` | The title of the issue created when a release fails. | `The automated release is failing 🚨` |
| `labels` | The [labels](https://help.github.com/articles/about-labels) to add to the issue created when a release fails. | `['semantic-release']` |
| `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. | - |

Expand Down
3 changes: 1 addition & 2 deletions lib/resolve-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ module.exports = ({
assets: assets ? castArray(assets) : assets,
successComment,
failComment,
failTitle:
isUndefined(failTitle) || failTitle === false ? 'The automated release is failing :rotating_light:' : failTitle,
failTitle: isUndefined(failTitle) || failTitle === false ? 'The automated release is failing 🚨' : failTitle,
labels: isUndefined(labels) ? ['semantic-release'] : labels === false ? [] : castArray(labels),
assignees: assignees ? castArray(assignees) : assignees,
});
8 changes: 4 additions & 4 deletions test/fail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.serial('Open a new issue with the list of errors', async t => {
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const pluginConfig = {failTitle};
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
const errors = [
Expand Down Expand Up @@ -102,7 +102,7 @@ test.serial('Open a new issue with assignees and the list of errors', async t =>
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const assignees = ['user1', 'user2'];
const pluginConfig = {failTitle, assignees};
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
Expand Down Expand Up @@ -135,7 +135,7 @@ test.serial('Open a new issue without labels and the list of errors', async t =>
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const labels = false;
const pluginConfig = {failTitle, labels};
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
Expand Down Expand Up @@ -167,7 +167,7 @@ test.serial('Update the first existing issue with the list of errors', async t =
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const pluginConfig = {failTitle};
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
const errors = [
Expand Down
6 changes: 3 additions & 3 deletions test/find-sr-issue.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.serial('Filter out issues without ID', async t => {
const owner = 'test_user';
const repo = 'test_repo';
const githubToken = 'github_token';
const title = 'The automated release is failing :rotating_light:';
const title = 'The automated release is failing 🚨';
const issues = [
{number: 1, body: 'Issue 1 body', title},
{number: 2, body: `Issue 2 body\n\n${ISSUE_ID}`, title},
Expand Down Expand Up @@ -65,7 +65,7 @@ test.serial('Return empty array if not issues found', async t => {
const owner = 'test_user';
const repo = 'test_repo';
const githubToken = 'github_token';
const title = 'The automated release is failing :rotating_light:';
const title = 'The automated release is failing 🚨';
const issues = [];
const github = authenticate({githubToken})
.get(
Expand All @@ -86,7 +86,7 @@ test.serial('Return empty array if not issues has matching ID', async t => {
const owner = 'test_user';
const repo = 'test_repo';
const githubToken = 'github_token';
const title = 'The automated release is failing :rotating_light:';
const title = 'The automated release is failing 🚨';
const issues = [{number: 1, body: 'Issue 1 body', title}, {number: 2, body: 'Issue 2 body', title}];
const github = authenticate({githubToken})
.get(
Expand Down
8 changes: 4 additions & 4 deletions test/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ test.serial('Comment on PR included in the releases', async t => {
const owner = 'test_user';
const repo = 'test_repo';
process.env.GH_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const prs = [{number: 1, pull_request: {}}];
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
const commits = [{hash: '123', message: 'Commit 1 message'}];
Expand Down Expand Up @@ -217,7 +217,7 @@ test.serial('Open a new issue with the list of errors', async t => {
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
const errors = [
new SemanticReleaseError('Error message 1', 'ERR1', 'Error 1 details'),
Expand Down Expand Up @@ -255,7 +255,7 @@ test.serial('Verify, release and notify success', async t => {
'test/fixtures/upload.txt',
{path: 'test/fixtures/upload_other.txt', name: 'other_file.txt', label: 'Other File'},
];
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const options = {
publish: [{path: '@semantic-release/npm'}, {path: '@semantic-release/github', assets}],
branch: 'master',
Expand Down Expand Up @@ -327,7 +327,7 @@ test.serial('Verify and notify failure', async t => {
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
const errors = [
new SemanticReleaseError('Error message 1', 'ERR1', 'Error 1 details'),
Expand Down
12 changes: 6 additions & 6 deletions test/success.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.serial('Add comment to PRs associated with release commits and issues close
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const pluginConfig = {failTitle};
const prs = [{number: 1, pull_request: {}}, {number: 2, pull_request: {}, body: 'Fixes #3'}];
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
Expand Down Expand Up @@ -83,7 +83,7 @@ test.serial('Make multiple search queries if necessary', async t => {
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const pluginConfig = {failTitle};
const prs = [
{number: 1, pull_request: {}},
Expand Down Expand Up @@ -147,7 +147,7 @@ test.serial('Do not add comment if no PR is associated with release commits', as
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const pluginConfig = {failTitle};
const options = {branch: 'master', repositoryUrl: `https://github.com/${owner}/${repo}.git`};
const commits = [{hash: '123', message: 'Commit 1 message'}];
Expand Down Expand Up @@ -176,7 +176,7 @@ test.serial('Add custom comment', async t => {
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const pluginConfig = {
successComment: `last release: \${lastRelease.version} nextRelease: \${nextRelease.version} branch: \${branch} commits: \${commits.length} releases: \${releases.length} PR attribute: \${issue.prop}`,
failTitle,
Expand Down Expand Up @@ -214,7 +214,7 @@ test.serial('Ignore errors when adding comments and closing issues', async t =>
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const pluginConfig = {failTitle};
const issues = [
{number: 1, body: 'Issue 1 body', title: failTitle},
Expand Down Expand Up @@ -265,7 +265,7 @@ test.serial('Close open issues when a release is successful', async t => {
const owner = 'test_user';
const repo = 'test_repo';
process.env.GITHUB_TOKEN = 'github_token';
const failTitle = 'The automated release is failing :rotating_light:';
const failTitle = 'The automated release is failing 🚨';
const pluginConfig = {failTitle};
const issues = [
{number: 1, body: 'Issue 1 body', title: failTitle},
Expand Down

0 comments on commit fbf1246

Please sign in to comment.