Add functionality to cross-post approved bounties to an additional Slack room
This commit is contained in:
parent
519d0dfed9
commit
8ddcfee6aa
|
@ -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-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/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/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 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`)
|
- `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`)
|
||||||
|
|
|
@ -105,6 +105,14 @@ async function assignIssueToBountyAwaitingForApproval (context, robot, assign) {
|
||||||
if (slackMessage && !process.env.DRY_RUN_BOUNTY_APPROVAL) {
|
if (slackMessage && !process.env.DRY_RUN_BOUNTY_APPROVAL) {
|
||||||
// Send message to Slack
|
// Send message to Slack
|
||||||
slackHelper.sendMessage(robot, config.slack.notification.room, slackMessage)
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue