trigger-automation-test-build: Trigger on `REVIEW` column, instead of `TO TEST`
This commit is contained in:
parent
a836085864
commit
95bd93d4d3
|
@ -56,23 +56,23 @@ async function processChangedProjectCard (robot, context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const projectBoardName = projectBoardConfig['name']
|
const projectBoardName = projectBoardConfig['name']
|
||||||
const testColumnName = projectBoardConfig['test-column-name']
|
const kickoffColumnName = automatedTestsConfig['kickoff-column-name']
|
||||||
|
|
||||||
if (repo.full_name !== automatedTestsConfig['repo-full-name']) {
|
if (repo.full_name !== automatedTestsConfig['repo-full-name']) {
|
||||||
robot.log.trace(`${botName} - Pull request project doesn't match watched repo, exiting`, repo.full_name, automatedTestsConfig['repo-full-name'])
|
robot.log.trace(`${botName} - Pull request project doesn't match watched repo, exiting`, repo.full_name, automatedTestsConfig['repo-full-name'])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let inTestColumn
|
let targetKickoffColumn
|
||||||
try {
|
try {
|
||||||
const columnPayload = await github.projects.getColumn({ column_id: payload.project_card.column_id })
|
const columnPayload = await github.projects.getColumn({ column_id: payload.project_card.column_id })
|
||||||
|
|
||||||
if (columnPayload.data.name !== testColumnName) {
|
if (columnPayload.data.name !== kickoffColumnName) {
|
||||||
robot.log.trace(`${botName} - Card column name doesn't match watched column name, exiting`, columnPayload.data.name, testColumnName)
|
robot.log.trace(`${botName} - Card column name doesn't match watched column name, exiting`, columnPayload.data.name, kickoffColumnName)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
inTestColumn = columnPayload.data
|
targetKickoffColumn = columnPayload.data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
robot.log.warn(`${botName} - Error while fetching project column`, payload.project_card.column_id, error)
|
robot.log.warn(`${botName} - Error while fetching project column`, payload.project_card.column_id, error)
|
||||||
return
|
return
|
||||||
|
@ -83,7 +83,7 @@ async function processChangedProjectCard (robot, context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const projectId = last(inTestColumn.project_url.split('/'), -1)
|
const projectId = last(targetKickoffColumn.project_url.split('/'), -1)
|
||||||
const projectPayload = await github.projects.get({ project_id: projectId })
|
const projectPayload = await github.projects.get({ project_id: projectId })
|
||||||
const project = projectPayload.data
|
const project = projectPayload.data
|
||||||
if (project.name !== projectBoardName) {
|
if (project.name !== projectBoardName) {
|
||||||
|
|
Loading…
Reference in New Issue