Skip to content
Part of alphagov/tech-docs-template (issues 👉https://github.com/alphagov/tech-docs-template/issues)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
fixtures/vcr_cassettes
lib
spec
.rspec
.ruby-version
.travis.yml
Gemfile
Gemfile.lock
LICENCE
LICENSE
README.md
Rakefile
app.json

README.md

Tech Docs Template - page expiry notifier

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

Travis 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 .travis.yml file:

matrix:
  - SITE_PAGE_API_URL=https://www.docs.verify.service.gov.uk/api/pages.json
  - SITE_PAGE_API_URL=https://gds-way.cloudapps.digital/api/pages.json
  - SITE_PAGE_API_URL=https://<YOUR_PUBLISHED_DOCS>/api/pages.json

Configure Travis CI

If you are not part of the alphagov GitHub organisation, you can still configure Travis CI to automatically deploy the notifier:

  1. Fork the tech-docs-monitor repository
  2. Get an incoming Slack webhook for the notifier
  3. Run travis encrypt to add the encrypted webhook to your .travis.yml file
  4. Add your published documentation page API URL to env.matrix in your .travis.yml file

General configuration

If you want to use something other than Travis CI to deploy the notifier, you must make sure all its environment variables are defined:

  • SITE_PAGE_API_URL: The full URL to your site's /api/pages.json file.
  • 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.

You can’t perform that action at this time.