This commit is contained in:
Bex Warner 2018-03-09 18:28:23 -05:00 ΠΊΠΎΠΌΠΌΠΈΡ‚ ΠΏΡ€ΠΎΠΈΠ·Π²Ρ‘Π» GitHub
Π ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ 80acd9e86d
ΠšΠΎΠΌΠΌΠΈΡ‚ c3747790c7
НС Π½Π°ΠΉΠ΄Π΅Π½ ΠΊΠ»ΡŽΡ‡, ΡΠΎΠΎΡ‚Π²Π΅Ρ‚ΡΡ‚Π²ΡƒΡŽΡ‰ΠΈΠΉ Π΄Π°Π½Π½ΠΎΠΉ подписи
Π˜Π΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ ΠΊΠ»ΡŽΡ‡Π° GPG: 4AEE18F83AFDEB23
1 ΠΈΠ·ΠΌΠ΅Π½Ρ‘Π½Π½Ρ‹Ρ… Ρ„Π°ΠΉΠ»ΠΎΠ²: 4 Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠΉ ΠΈ 15 ΡƒΠ΄Π°Π»Π΅Π½ΠΈΠΉ

ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -5,30 +5,19 @@ module.exports = (robot) => {
robot.on('push', async context => {
const config = await context.config('config.yml')
const id = config.watchedProject.id
const columns = await context.projects.getProjectColumns({id})
const data = {
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name
}
const columns = await context.projects.getProjectColumns({context.repo(id)})
// generate labels based on project column names
columns.forEach(async column => {
// check if label already exists
const label = await context.issues.getLabel({
owner: data.owner,
repo: data.repo,
name: column.name
})
const label = await context.issues.getLabel({context.issue(name: column.name)})
// if it doesn't exist, create a new label
if (label.status === 404) {
const newLabel = context.issues.createLabel({
owner: data.owner,
repo: data.repo,
const newLabel = context.issues.createLabel({context.issue(
name: column.name,
color: randomColor()
})
)})
}
})