Skip to main content

Application: tech-docs-monitor

Part of alphagov/tech-docs-template (issues 👉https://github.com/alphagov/tech-docs-template/issues)

Ownership
N/A
Hosting
Heroku
Continuously deployed?
No

README

This repo is part of the tech-docs-template, and is used in conjunction with the page expiry feature that is part of the tech-docs-gem

Concourse CI will run the script once a day during weekdays. It will look at the pages API for your site, find all pages that have expired, and post a Slack message to the owner of each page to let them know that it needs reviewing.

Usage

alphagov users

If you are part of the alphagov GitHub organisation you can enable the notifier by raising a PR to add your published documentation to the Rakefile:

pages_urls = [
  "https://gds-way.cloudapps.digital/api/pages.json",
  "https://docs.publishing.service.gov.uk/api/pages.json",
  "your-docs-site.cloudapps.digital"
]

If you want to limit the number of links that are posted to Slack after a single run, add this to limits in the Rakefile

limits = {
  "your-docs-site.cloudapps.digital" => 3
}

The default behaviour is no limit, and the Slack message will contain all pages discovered.

General configuration

The following environment variables are necessary:

  • SLACK_WEBHOOK_URL: The Slack webhook URL to allow messages to be posted.
  • REALLY_POST_TO_SLACK: Messages will only be posted to Slack if the value of this var is 1.

Licence

The gem is available as open source under the terms of the MIT License.