Something that would be nice to see in GitHub and Bitbucket is the ability to prevent merging of a pull request if a comment containing a particular regular expression is found in the diff. For example, if I were to add a comment that begins with
TEMP in the code, and submit that code as a pull request, I would be unable to merge that pull request until that comment is removed.
This would be useful for protecting accidental merges of temporary changes. Usually I make a note of such changes when I’m working on the code, and I may forget about them when it comes time to merging the pull request.
An example of such a change that I make often is temporary release versions of libraries. I may have made a change to a library that’s sitting in another pull request. Until that pull request has been merged, I cannot make a release version of that library, but I can make a temporary release so that a dependant change I’m working on can be built. That temporary release is listed as a dependency, but I don’t want to merge the pull request until the change to the library has been merged and a proper release has been made.
Surrounding the temporary release version with comments that begin with
TEMP make that clear the reviewers, but preventing the pull request from being merged until I change the version and remove the comments would be a nice safety feature.