How I automate my changelog with imdone!

Jesse Piascik
imdone.io
Published in
2 min readFeb 23, 2022

I work full time as an advising consultant and software engineer, so I really need to automate a lot my work on imdone. For starters, I use imdone to plan and manage releases of imdone.

Being the first user of an imdone release allows me to try out new functionality to automate my workflow. In imdone 1.26, I introduced the ability to add .imdone/actions/card.js and .imdone/actions/board.js modules. This allows you to add board actions to the main menu in imdone.

This board action copies to your clipboard the title of each card in the READY list as a markdown list, which you can paste into your changelog.

To add this menu option create a .imdone/actions/board.js file in your project and add the following.

module.exports = [
{
title: 'Copy changelog',
action: function () {
const lists = this.cards.filter(list => list.name === 'READY')
const cards = lists[0].tasks.map(task => {
// remove all leading #
return task.text.replace(/^\#*\s*/, '').replace(/^/, '- ')
})

this.copy(cards.join('\n'), 'Changelog copied')
}
}
]

If you’re interested in writing your own board action, add these actions to your module to see the properties and methods of this.

{
title: 'Export action this',
action: function() {
this.saveFile({
file: 'imdone-export.json',
content: JSON.stringify(this, null, 3)
})
}
},
{
title: 'Export action this methods',
action: function() {
const methods = Object.getOwnPropertyNames(this)
.filter(name => typeof this[name] === 'function')
.map(name => {
return `${name} ${this[name].toString().replace(/ =>.*$/s, '')}`
})
.join('\n')
this.saveFile({
file: 'methods.txt',
content: methods
})
}
}

--

--