From 027f01ba557ebb15e6dae25c3ec474316493e088 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Sat, 20 Jan 2018 00:46:51 +0100 Subject: [PATCH] Change Slack room name in config --- github.yaml | 4 ++-- scripts/assign-new-pr-to-review.js | 4 ++-- scripts/greet-new-contributor.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/github.yaml b/github.yaml index 5e8324b..5138ca1 100644 --- a/github.yaml +++ b/github.yaml @@ -1,4 +1,4 @@ -pull-requests: +new-pull-requests: project-board: name: 'Pipeline for QA' review-column-name: 'REVIEW' @@ -8,4 +8,4 @@ pull-requests: slack: notification: - room: 'core' \ No newline at end of file + room: 'status-hubot' \ No newline at end of file diff --git a/scripts/assign-new-pr-to-review.js b/scripts/assign-new-pr-to-review.js index 6a915c9..fafec7d 100644 --- a/scripts/assign-new-pr-to-review.js +++ b/scripts/assign-new-pr-to-review.js @@ -56,7 +56,7 @@ async function assignPullRequestToReview(gitHubContext, githubPayload, robot) { }); // Find "Pipeline for QA" project - const projectBoardName = githubConfig['pull-requests']['project-board'].name; + const projectBoardName = githubConfig['new-pull-requests']['project-board'].name; const project = ghprojects.data.find(function(p) { return p.name === projectBoardName }); if (!project) { robot.logger.warn(`Couldn't find project ${projectBoardName} in repo ${ownerName}/${repoName}`); @@ -69,7 +69,7 @@ async function assignPullRequestToReview(gitHubContext, githubPayload, robot) { try { ghcolumns = await github.projects.getProjectColumns({ project_id: project.id }); - const reviewColumnName = githubConfig['pull-requests']['project-board']['review-column-name']; + const reviewColumnName = githubConfig['new-pull-requests']['project-board']['review-column-name']; const column = ghcolumns.data.find(function(c) { return c.name === reviewColumnName }); if (!column) { robot.logger.warn(`Couldn't find ${projectBoardName} column in project ${project.name}`); diff --git a/scripts/greet-new-contributor.js b/scripts/greet-new-contributor.js index 0877b20..74b54d8 100644 --- a/scripts/greet-new-contributor.js +++ b/scripts/greet-new-contributor.js @@ -34,7 +34,7 @@ module.exports = function(robot) { async function greetNewContributor(gitHubContext, githubPayload, robot) { // TODO: Read the welcome message from a (per-repo?) file (e.g. status-react.welcome-msg.md) const github = gitHubContext.api(); - const welcomeMessage = gitHubContext.config()['pull-requests']['welcome-bot'].message; + const welcomeMessage = gitHubContext.config()['new-pull-requests']['welcome-bot'].message; const ownerName = githubPayload.repository.owner.login; const repoName = githubPayload.repository.name; const prNumber = githubPayload.pull_request.number;