-
Notifications
You must be signed in to change notification settings - Fork 9
Design Decisions
The REST-API for confluence implements a method to update single pages, but it does not check if the new content is different to the currently active content. It always creates a new version and notifies people of a change via mail.
-
I’ve found no way to change the behaviour (described above) of confluence in such a way that it will not update a page if it has not been changed
-
A solution could have been to read the current active content and compare it to the locally new page. Since confluence changes the page when it gets submitted (confluence has its own storage format), the local script has first to apply these changes and then compare both versions of the page. An older version of the script tries to use this approach but since not all transformations to the local page are known, this seems to be unstable.
-
Another solution could have been to ask confluence to transform the local page without storing it and then compare it to the remote one. Confluence implements an API for converting page content, but not from and to the needed format. A dirty workaround could have been to use another dummy or temp page for this conversion.
-
Chosen solution: Whenever a local page is send to confluence, a hash code of this page is appended. This hash code is hidden by setting the CSS style of the surrounding paragraph to "display: none". Whenever a page has to be updated, the local and remote hash codes are compared in order to decide if the local page is different from the remote one.