|
2 | 2 |
|
3 | 3 | ## Introduction
|
4 | 4 |
|
5 |
| -Tell something about your typescript module. |
| 5 | +_confluence-outdated_ searches a Confluence space for documents that haven't been updated for a specified time and |
| 6 | +notifies the author of the last version of each document or a separate page maintainer. |
6 | 7 |
|
7 |
| -## Building |
| 8 | +## Installation |
| 9 | + |
| 10 | +Install _confluence-outdated_ globally running |
| 11 | + |
| 12 | + npm install -g confluence-outdated |
| 13 | + |
| 14 | +## Configuration Document |
| 15 | + |
| 16 | +_confluence-outdated_ needs several things configured before it can start working. To simplify this, |
| 17 | +_confluence-outdated_ reads its configuration from a Confluence document. |
| 18 | + |
| 19 | +The structure of this document is based on Panels and tables. To ease the creation of this document, |
| 20 | +_confluence-outdated_ includes a command to create a template document: |
| 21 | + |
| 22 | + confluence-outdated createconfigurationdocument --url <Confluence base URL> --user <Username> --password <Password> --space <Key of space that should hold the document> --title <Title for the configuration document> --parentId <Page ID that the configuration document is place under> |
| 23 | + |
| 24 | +Example: |
| 25 | + |
| 26 | + confluence-outdated createconfigurationdocument --url https://example.com/confluence --user somebody --password secret --space CM --title "My configuration document" --parentId 12345 |
| 27 | + |
| 28 | +The command will output the page ID for the configuration document and a link to it. |
| 29 | + |
| 30 | +The configuration is based on several panels. The configuration for the different panels is as follows: |
| 31 | + |
| 32 | +### Panel "Configuration" |
| 33 | + |
| 34 | +- Space: The key of the space where _confluence-outdated_ should check for outdated documents |
| 35 | +- Domain: A default domain, that will be appended to all author usernames (should be set if the usernames aren't email addresses themselves) |
| 36 | +- NotificationFrom: <The address used as the sender in the notification mails |
| 37 | + |
| 38 | +### Panel "Checks" |
| 39 | + |
| 40 | +A table of checks that will be carried out. |
| 41 | + |
| 42 | +- Labels: A list of all labels (separated by ,) that a checked document has to match |
| 43 | +- MaxAge: The maximum age of a checked document. If a document was modified before that, a notification is send |
| 44 | + |
| 45 | +### Panel "Maintainer" |
| 46 | + |
| 47 | +A table of maintainers for pages. |
| 48 | + |
| 49 | +- PagePattern: A regular expression that is matched against the document title |
| 50 | +- Maintainer: The user that should receive all notifications for pages matching this pattern |
| 51 | + |
| 52 | +### Panel "Notification Template" |
| 53 | + |
| 54 | +This panel includes two child panels which hold [Handlebars](https://handlebarsjs.com/guide/) templates for the |
| 55 | +subject and the body of the notification mails. |
| 56 | + |
| 57 | +They will get [this object](https://github.com/dodevops/confluence-outdated/blob/master/lib/api/DocumentInfo.ts#L6) as |
| 58 | +a context for the template. |
| 59 | + |
| 60 | +## Development |
| 61 | + |
| 62 | +The tests subdirectory contain unit tests run by mocha for all parts of the api. If you want to help developing, please |
| 63 | +follow the following workflow: |
| 64 | + |
| 65 | +- Create an issue describing the bug or feature |
| 66 | +- For this repository |
| 67 | +- Create a branch named "issue-<issue number>" |
| 68 | +- Write a test that tests the feature or bug |
| 69 | +- Run the test => the new test should fail |
| 70 | +- Write or fix the code for the change |
| 71 | +- Run the test again => the new test should succeed |
| 72 | +- Push and create a pull request |
8 | 73 |
|
9 | 74 | To test and build this package, simply use grunt:
|
10 | 75 |
|
|
0 commit comments