Implement clean_redirects monthly maintenance task

Follow-up from #29 (closed)

The existing clean_redirects rake task (source) automates the removal of the expired redirect files:

  • For each content source project, search for remove_date in the front matter
  • For each file found:
    • Check if the remove_date is in the past.
    • If so, remove the file and adds a new entry to the redirects.yaml file.
    • The new redirect entry includes the old path, new path, and a removal date 9 months in the future.
  • Creates a commit and an MR for the change in each repo, then an MR to gitlab-docs for the changes to redirects.yaml

It is part of the TW team's monthly chores list: https://gitlab.com/gitlab-org/technical-writing/-/blob/main/.gitlab/issue_templates/tw-monthly-tasks.md

Docs here: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/raketasks.md#clean-up-redirects

We should re-implement this as a Go script in the cmd/gldocs/tasks package.

Ideally we can also address these open issues with the existing version:

Edited by Sarah German