Implement footer "Reopens:" and automatic revert detection
This patch introduces a new footer, "Reopens", which reopens a JIRA
issue upon merge of the change. Reopens and Fixes targeting the same
jira issue should not be specified in the same commit. However, if This
occurs, the bot will prioritize the Fixes footer as a closing action.
In order to allow the use of Fixes: to close an issue after it has been
reopened by the bot or manually, the bot will now check issue comments
to determine if the issue has been previously closed by the currently
merging change ID. If so, the bot will ignore the close action.
In practice, this means that cherry-picks which include a Fixes footer
will not re-close an issue, but a new change with a fresh Change ID
will close the issue with the Fixes footer as expected.
The bot will also now automatically tag relevant jira issues
with the commit of a revert, if the commit message contains
the standard revert message "This reverts commit ([0-9a-f]{40})".
When a revert is detected, the bot will also tag any JIRA issues
tagged in the original reverted commit message footers.
Fixes: QTQAINFRA-6248
Change-Id: I92def4927516fbab5e520cd23d34032b3dc4ade7
Reviewed-by: Daniel Smith <daniel.smith@qt.io>