Simplify Slack messages

This commit is contained in:
Pedro Pombeiro 2018-01-20 11:00:00 +01:00
parent 500ff2d2a6
commit 13e77ea757
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ async function assignPullRequestToReview(gitHubContext, githubPayload, robot) {
robot.logger.debug(`Created card: ${ghcard.data.url}`, ghcard.data.id);
// Send message to Slack
robot.messageRoom(githubConfig.slack.notification.room, `Moved PR #${githubPayload.pull_request.number} (${githubPayload.pull_request.title}) to ${reviewColumnName} in ${projectBoardName} project\n${githubPayload.pull_request.html_url}`);
robot.messageRoom(githubConfig.slack.notification.room, `Moved PR to ${reviewColumnName} in ${projectBoardName} project\n${githubPayload.pull_request.html_url}`);
} catch (err) {
robot.logger.error(`Couldn't create project card for the PR: ${err}`, column.id, githubPayload.pull_request.id);
}

View File

@ -61,7 +61,7 @@ async function greetNewContributor(gitHubContext, githubPayload, robot) {
})
// Send message to Slack
robot.messageRoom(githubConfig.slack.notification.room, `Greeted ${githubPayload.pull_request.user.login} on his first PR (${githubPayload.pull_request.title}) in ${repoName}\n${githubPayload.pull_request.html_url}`);
robot.messageRoom(githubConfig.slack.notification.room, `Greeted ${githubPayload.pull_request.user.login} on his first PR in the ${repoName} repo\n${githubPayload.pull_request.html_url}`);
} catch (err) {
if (err.code !== 404) {
robot.logger.error(`Couldn't create comment on PR: ${err}`, ownerName, repoName);