Official upstream source mirror. Do not make UH changes here.
  • Ruby 69.5%
  • HTML 29.5%
  • SCSS 0.6%
  • Dockerfile 0.3%
  • JavaScript 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-28 10:05:22 +01:00
.github Bump ruby/setup-ruby from 1.325.0 to 1.327.0 2026-09-28 00:23:21 +00:00
.yarn/releases Upgrade yarn to 3.6.4 2023-10-19 10:05:40 +01:00
app Restore table stylesheet import 2026-09-24 10:15:19 +01:00
bin Update Rails framework defaults to 8.1 2026-02-16 16:03:05 +00:00
config Remove admin template code and migration alert 2026-09-08 10:31:45 +01:00
db Expand db seed to include organisation model 2026-06-16 15:12:05 +01:00
docs Add rake task for creating and applying a redirect [WHIT-3252] 2026-04-07 14:55:48 +01:00
lib/tasks Add rake task for creating and applying a redirect [WHIT-3252] 2026-04-07 14:55:48 +01:00
log Blank Rails 4.1.4 app 2014-07-08 16:01:25 +01:00
public Upgrade to Rails 8 2025-01-29 16:44:30 +00:00
spec Migrate live requests list 2026-09-07 11:32:21 +01:00
.dockerignore Remove obsolete Jenkinsfile. 2024-01-31 16:20:44 +00:00
.gitignore Configure builds 2024-01-23 11:02:03 +00:00
.govuk_dependabot_merger.yml Allow auto-merging of patch versions of Rails 2024-09-24 11:29:52 +01:00
.rspec Add rspec 3 2014-07-08 16:19:35 +01:00
.rubocop.yml Add standard header to protect .rubocop.yml 2021-11-09 09:41:28 +00:00
.ruby-version Upgrade to Ruby 3.3 2024-12-10 16:55:53 +00:00
.yarnrc.yml Upgrade yarn to 3.6.4 2023-10-19 10:05:40 +01:00
config.ru Run app:update task 2021-09-30 10:23:25 +01:00
Dockerfile Upgrade to Ruby 3.3 2024-12-10 16:55:53 +00:00
Gemfile Bump rails from 8.1.3.1 to 8.1.4 2026-09-28 00:22:46 +00:00
Gemfile.lock Merge pull request #1774 from alphagov/dependabot/bundler/simplecov-1.3.1 2026-09-28 10:05:14 +01:00
LICENCE Add LICENCE 2016-04-12 16:05:30 +01:00
package.json Bump stylelint from 17.14.1 to 17.15.0 2026-09-08 00:22:48 +00:00
Procfile Add a Procfile for Sidekiq worker 2020-03-12 14:12:53 +00:00
Rakefile Always print code coverage after running tests 2020-09-21 14:08:28 +01:00
README.md Add a minor grammatical fix to the documentation 2021-11-30 14:16:25 +00:00
yarn.lock Bump js-yaml from 4.3.1 to 4.3.2 2026-09-09 13:12:40 +00:00

Short URL manager

Publishing tool to request, approve and create Short URLs on GOV.UK. Short URLs are a short and easy-to-type URL that redirects to a piece of content at a much longer URL.

They are often used on posters, in leaflets or over the phone, so they are easy to use. For example:

/dwp/cps5

to

/government/publications/your-state-pension-estimate-explained-cps5

Technical documentation

This is a Ruby on Rails app, and should follow our Rails app conventions.

You can use the GOV.UK Docker environment to run the application and its tests with all the necessary dependencies. Follow the usage instructions to get started.

Use GOV.UK Docker to run any commands that follow.

Testing

The default rake task runs all the tests:

bundle exec rake

Permissions

Users must be given Signon permissions to access and use the features of this tool. The available permissions are:

  • request_short_urls: Can complete a form to request a new Short URL, which must be approved before being made
  • manage_short_urls: Can approve requests for Short URLs, and create the redirects on GOV.UK
  • receive_notifications: Will receive email notifications when a new short URL is requested.
  • advanced_options: Can create and approve requests using advanced options (prefix type redirects, and non-default segments mode values).

Licence

MIT License