in src/Worker.ts [304:326]
async updateLabel() {
const client = await this.kintoneClientCreator.createKintoneClient(
this.apps.labels.token
);
const sameLabelId = await ApiExecutor.getRecordIdFromLabelOfSame(
client,
this.apps.labels.id,
this.trelloAction.data
);
if (sameLabelId === undefined) {
return ApiExecutor.createLabel(
client,
this.apps.labels.id,
this.trelloAction.data
);
}
return ApiExecutor.updateLabel(
client,
this.apps.labels.id,
this.trelloAction.data,
sameLabelId
);
}