Skip to content

Commit 3e4749a

Browse files
authored
feat(bots/bugbuster): add links to lintAll results (botpress#14832)
1 parent cae7261 commit 3e4749a

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

bots/bugbuster/bot.definition.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,9 @@ export default new sdk.BotDefinition({
122122
clientSecret: genenv.BUGBUSTER_SLACK_CLIENT_SECRET,
123123
signingSecret: genenv.BUGBUSTER_SLACK_SIGNING_SECRET,
124124
typingIndicatorEmoji: false,
125+
replyBehaviour: {
126+
location: 'channel',
127+
onlyOnBotMention: false,
128+
},
125129
},
126130
})

bots/bugbuster/src/handlers/lint-all.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import * as types from 'src/types'
22
import * as boot from '../bootstrap'
33
import * as bp from '.botpress'
44

5+
const LINEAR_ISSUE_BASE_URL = 'https://linear.app/botpress/issue/'
6+
57
export const handleLintAll: bp.WorkflowHandlers['lintAll'] = async (props) => {
68
const { client, workflow, ctx, conversation } = props
79

@@ -112,7 +114,9 @@ export const handleLintAllTimeout: bp.WorkflowHandlers['lintAll'] = async (props
112114
}
113115

114116
const _buildResultMessage = (results: types.LintResult[]) => {
115-
const failedIssuesLinks = results.filter((result) => result.result === 'failed').map((result) => result.identifier)
117+
const failedIssuesLinks = results
118+
.filter((result) => result.result === 'failed')
119+
.map((result) => `[${result.identifier}](${LINEAR_ISSUE_BASE_URL + result.identifier})`)
116120

117121
let messageDetail = 'No issue contained lint errors.'
118122
if (failedIssuesLinks.length === 1) {

0 commit comments

Comments
 (0)