In my case resource is statefull enviroment(jenkins agents on vm) with random set of services. Dev or test team member configure service set with parametrs and locks resource by userid.
Now notes are sets manually which do it are only human readable. Locked resource already has userid, so i need lock time(declarative pipeline not set time properly ), service set , service version, Jira issue link, user comments, last build status.
I haven't 'append' case at now, but any way it will be - get html note - parse - edit - replace note.
When lockable resource didn't have no notes feature, i have pritty same idea - integrate confluence space via api. But there some ssl issue on confluence side which cant be solved now
The Lockable Resources plugin does not provide a pipeline step for reading or modifying the notes of lockable resources, but I suppose a global pipeline library would be trusted by Jenkins and would be able to call org.jenkins.plugins.lockableresources.LockableResourcesManager.get() (source, javadoc), navigate to the LockableResource instance from there, and call LockableResource.getNote() or LockableResource.setNote(String note).