forget-me-not

Rationale

check-fixmes and check-branches can be run as part of the test suite of each project (by a continuous integration system such as Jenkins). They break builds when they detect old annotations or branches.

But nobody wants to see builds break unexpectedly. What if you were warned that a build will soon break because of an old annotation or an old branch? This is what forget-me-not does. Configured with a warning delay (that defaults to 15 days), it sends an e-mail report to each author of a soon-to-be breaking old annotation or branch. While forget-me-not could be run on a single project, it makes sense to run it once accross a set of projects.

Usage and possible customization

$ forget-me-not --help
usage: forget-me-not [-h] [--conf CONF] [--warning-delay WARNING_DELAY] [--output {mail,stdout}] [path]

Warn about annotations and branches that will soo be too old.

positional arguments:
  path                  Directory that contains all Git repositories to check. Defaults to the working directory.

optional arguments:
  -h, --help            show this help message and exit
  --conf CONF           Path of the configuration file. Defaults to forget-me-not.toml if it exists.
  --warning-delay WARNING_DELAY
                        Number of days. Annotations and branches are reported if they turn old within this delay. Defaults to 15.
  --output {mail,stdout}

See the Configuration section below for full details.

To detect old annotations and branches, forget-me-not uses the configuration files of each project (or defaults for project that do not have configuration files). See previous chapters for further details about the configuration of check-fixmes and check-branches.

Configuration

forget-me-not takes its own configuration from a TOML file which, by default and if present, is forget-me-not.toml in the requested path (which itself is the current working directory if not provided). A limited list of options can be overridden via command line arguments (that you can list with forget-me-not --help). Such overrides take precedence over the values defined in the configuration files (or the default values if omitted).

The TOML configuration file should not have any top-level sections. Here is an example:

warning-delay = 15
ignored-repositories = [
    'systools',
]

# SMTP
smtp.host = "localhost"

# Recipients
recipients.catch-all = "developers@example.com"
recipients.list = [
    "john.smith@example.com",
    "jane.doe@example.com",
]
[recipients.aliases]
johnny = "john.smith@example.com"

Here is the list of all options that can be configured via the TOML configuration file:

General options

ignored-repositories

A list of repositories not to check.

Type: list.
Default: [] (no repository is ignored).
Example: ignored-repositories = ["legacy-project"].

output (overridable via the command line)

Whether forget-me-not should print reports on the standard output, send reports by e-mail, or both.

Type: list.
Default: ["stdout"] (do not send e-mail reports by default).
Example: ["stdout", "mail"].

On the command-line, you can provide multiple values by using the option twice:

$ forget-me-not --output stdout --output mail

path (overridable via the command line)

The path of the directory in which forget-me-not looks for Git repositories to check. It must be a directory.

Type: string.
Default: "." (current working directory).
Example: path = "/path/to/all/checkouts".

warning-delay (overridable via the command line)

The number of days to warn before an annotation or a branch is considered old, as per the configuration of each project.

Type: integer.
Default: 15 (days).
Example: warning-delay = 7.