Open a Modal Dialog when issue is Done

Hi there!
I’m just starting with Forge and JIRA apps development, I need to open a ModalDialog when an issue changes its state to “Done” (either by dragging it to the Done column or by changing its status in the issue panel).

This is my code so far:

const DONE = 'Done';

export async function run(event, context) {
	console.log('Hello World!', event, event.changelog.items);

	// if the issue is solved (status changed to Done)
	if (event.changelog.items.some(function changedToPreferredStatus(change)  {
		return statusChangedTo(change, DONE);
	})) {
		let description = event.issue.fields.summary;

		// OPEN MODAL DIALOG HERE
	}
}

function statusChangedTo(change, to) {
	return change.field === 'status' && change.toString === to;
}