diff --git a/README.md b/README.md index 7f4cd68..769a08f 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ Examples of settings that can be configured: - `bounty-project-board/awaiting-approval-column-name`: Name of the column in the bounty project board to group issues that are awaiting for bounty approval - `bounty-project-board/awaiting-approval-label-name`: Name of the label used in issues to declare that an issue is awaiting approval to become a bounty - `bounty-project-board/bounty-label-name`: Name of the label used in issues to declare that an issue is a bounty + - `bounty-project-board/post-approved-bounties-to-slack-room`: Name of the Slack room where to cross-post approved bounties - Automated tests settings: - `automated-tests/repo-full-name`: Full name of the repo to watch in project cards in order to automatically run automated tests CI job (e.g. `status-im/status-react`) diff --git a/bot_scripts/assign-to-bounty-awaiting-for-approval.js b/bot_scripts/assign-to-bounty-awaiting-for-approval.js index 2838735..86f8ae8 100644 --- a/bot_scripts/assign-to-bounty-awaiting-for-approval.js +++ b/bot_scripts/assign-to-bounty-awaiting-for-approval.js @@ -105,6 +105,14 @@ async function assignIssueToBountyAwaitingForApproval (context, robot, assign) { if (slackMessage && !process.env.DRY_RUN_BOUNTY_APPROVAL) { // Send message to Slack slackHelper.sendMessage(robot, config.slack.notification.room, slackMessage) + + // Cross-post approved bounties to a predefined room + if (!assign && isOfficialBounty) { + const slackRoom = projectBoardConfig['post-approved-bounties-to-slack-room'] + if (slackRoom) { + slackHelper.sendMessage(robot, slackRoom, slackMessage) + } + } } }