Requests for comment/Release notes automation

Introduction
Most of the devs have encountered a merge conflict due to RELEASE-NOTES. This RFC proposes a bot to monitor master merges, and automatically append text based on a footer in the commit message. The bot doesn't have to handle all complex scenarios - in case of a problem, someone could do a regular file patch as it is done now.

keyword
foo: The subject line of the commit

Commit message body.

RELEASE New features that spans multiple lines.
 * Bullet point to add to the release notes

Blank lines and lines not part of a bullet point are ignored.

RELEASE Bug fixes
 * (bug 123) Another item to go into a different section.
 * (bug 345) Another item to go into a different section.

Change-Id: I15915e04bfed744931e05b6493c14b82cd0a41a9

RELEASE === Bug fixes === RELEASE Bug fixes
 * All of that text will be automagically added to the RELEASE-NOTES sections once the bot detects that a branch has been merged with the master
 * It would be ideal if the bot checks if such header actually exists in the file and emails user in case of an error (on branch commit, not on merge)
 * It would be great if Jenkins detected those errors
 * Bot should understand any of these forms of headers:

footer
foo: The subject line of the commit

Commit message body.

Lines not directly connected to the footer are ignored. They will be line-wrapped later.

Release-New-Features: Bullet point to add to the release notes that spans multiple lines. Release-Bug-Fixes: (bug 123) Another item to go into a different section. Release-Bug-Fixes: (bug 345) Another item to go into a different section. Change-Id: I15915e04bfed744931e05b6493c14b82cd0a41a9

Commit bot

 * Bot runs periodically
 * Looks through all commits to master since the last run
 * Extracts the bullet points associated with their respective sections to go in
 * Update repository
 * Edit file
 * Commit, push to gerrit, auto-merge (like i18n-bot)

Jenkins hook

 * Based on the jenkins-bot in OpenStack's Gerrit.


 * In the submit pipeline
 * Look through the commit message
 * Edit release notes file
 * Submit amended patch set with the updated release notes file and the lines removed from the commit message
 * Submit patchset


 * Advantage:
 * Leaves commit message clean
 * Keeps modification of release notes in the same commit
 * Less pollution in the commit history