зеркало из https://github.com/electron/trop.git
add logging
This commit is contained in:
Родитель
388fb49670
Коммит
ca2f5899dc
13
index.js
13
index.js
|
@ -4,7 +4,17 @@ module.exports = (robot) => {
|
|||
// get watched board and create labels based on column names
|
||||
robot.on('push', async context => {
|
||||
const config = await context.config('config.yml')
|
||||
|
||||
if (config.watchedProject) {
|
||||
const projects = await context.github.projects.getRepoProjects(context.repo())
|
||||
const project = projects.data.find(project => project.name === config.watchedProject)
|
||||
console.log(`NAME IS ${project.name}`)
|
||||
|
||||
if (project) {
|
||||
const id = config.watchedProject.id
|
||||
console.log(`ID IS ${id}`)
|
||||
|
||||
console.log(context.github.projects)
|
||||
const columns = await context.github.projects.getProjectColumns(context.repo({id}))
|
||||
|
||||
// generate labels based on project column names
|
||||
|
@ -20,7 +30,8 @@ module.exports = (robot) => {
|
|||
}))
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
robot.log('all labels created!')
|
||||
})
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче