I am pleased to say this morning (Eastern United States time) I merged an infrastructure change to our development branch which will use Danger to run a suite of checks we control against every PR opened for development.

This will make it easier for the core Mudlet team to manage PRs, as we can automate checks and not have to worry about if we forgot to check something. Much like the recently included Lua tests, it increases our confidence when accepting PRs that they will conform to our standards and work more seamlessly within our infrastructure.

The new checks are as follows:

  • Makes sure the PR title starts with a proper keyword. “Add”, “Improve”, “Fix”, or “Infra”. This will ensure our automated release notes can categorize it for the changelog. It’s case insensitive, so “fixes Y issue”, “Improved support for X”, “Infrastructure enhancements” are all valid PR titles in terms of the check.
  • Makes sure that any new TODO items in code carry a github issue URL on the same line. This will ensure we can reference a centrally tracked item for any new TODO.
  • Prints a warning message if the PR title is more than 25 words long. This is to help us make sure we keep them short and understandable for end users, not just developers. Does not block merging but calls manual attention to it.
  • Prints a warning message if the PR touches more than 10 source code files. This is to help us keep PRs small and easily looked over. Which also makes them easier to troubleshoot if something goes wrong.

I’m sure we’ll think of more as we go on, but automating these sorts of things should ultimately lead to smoother releases and less instances of things ‘slipping by’ accidentally.