Skip to content

Commit 34a3073

Browse files
committed
Refine logging messages
1 parent 88d3771 commit 34a3073

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/reporter/github.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default class GitHub {
3838
const missingLabels = this.MANAGED_LABELS.filter(label => !existingLabelsNames.includes(label.name));
3939

4040
if (missingLabels.length) {
41-
logger.info(`🤖 Following required labels are not present on the repository: ${missingLabels.map(label => `"${label.name}"`).join(', ')}. Creating them…`);
41+
logger.info(`Following required labels are not present on the repository: ${missingLabels.map(label => `"${label.name}"`).join(', ')}. Creating them…`);
4242

4343
for (const label of missingLabels) {
4444
await this.createLabel({ /* eslint-disable-line no-await-in-loop */
@@ -49,7 +49,7 @@ export default class GitHub {
4949
}
5050
}
5151
} catch (error) {
52-
logger.error(`🤖 Failed to handle repository labels: ${error.message}`);
52+
logger.error(`Failed to handle repository labels: ${error.message}`);
5353
}
5454
}
5555

@@ -136,9 +136,9 @@ export default class GitHub {
136136
await this.addCommentToIssue({ issue: openedIssue, comment });
137137
await this.closeIssue(openedIssue);
138138

139-
return logger.info(`🤖 Closed issue #${openedIssue.number}: ${openedIssue.html_url}`);
139+
return logger.info(`Closed issue #${openedIssue.number}: ${openedIssue.html_url}`);
140140
} catch (error) {
141-
logger.error(`🤖 Failed to handle issue "${title}": ${error.message}`);
141+
logger.error(`Failed to update issue "${title}": ${error.message}`);
142142
}
143143
}
144144

@@ -149,12 +149,12 @@ export default class GitHub {
149149
if (!issue) {
150150
const createdIssue = await this.createIssue({ title, description, labels: [label] });
151151

152-
return logger.info(`🤖 Created GitHub issue #${createdIssue.number} "${title}": ${createdIssue.html_url}`);
152+
return logger.info(`Created issue #${createdIssue.number} "${title}": ${createdIssue.html_url}`);
153153
}
154154

155155
if (issue.state == GitHub.ISSUE_STATE_CLOSED) {
156156
await this.openIssue(issue);
157-
logger.info(`🤖 Reopen issue #${issue.number}: ${issue.html_url}`);
157+
logger.info(`Reopened issue #${issue.number}: ${issue.html_url}`);
158158
}
159159

160160
const managedLabelsNames = this.MANAGED_LABELS.map(label => label.name);
@@ -168,9 +168,9 @@ export default class GitHub {
168168

169169
await this.setIssueLabels({ issue, labels: [ label, ...labelsNotManagedToKeep ] });
170170
await this.addCommentToIssue({ issue, comment: description });
171-
logger.info(`🤖 Updated issue #${issue.number}: ${issue.html_url}`);
171+
logger.info(`Updated issue #${issue.number}: ${issue.html_url}`);
172172
} catch (error) {
173-
logger.error(`🤖 Failed to handle issue "${title}": ${error.message}`);
173+
logger.error(`Failed to update issue "${title}": ${error.message}`);
174174
}
175175
}
176176
}

0 commit comments

Comments
 (0)