It is an integration blocker to not have the same title on the PR as in JBS. This is a good rule, but it can sometimes create additional and unnecessary administrative hassle for the developers.
Particularly bothersome is the cases where the titles only differ by whitespace, or punctuation or similar, so that when eyeballing the title, they appear to be the same.
Skara already rewrites the title in two cases:
1) If the title is just a bug number, we fetch the title from JBS.
2) If the bug number is prefixed by the project moniker (as in typical JBS bug references), this is removed to just keep the number.
I propose that we furthermore rewrite the title to actually match the JBS title, if the two differs. So instead of complaining on it as a blocker, we will just fix it for the user.
To clarify that this has happened, the bot should add a note along the lines of: "The title was rewritten to match the title on JBS. If you want to modify the title, you must modify the title in JBS. The previous title on this PR was: <previous title>"
And to help the user understand what has happened, we should do a simple comparison where we take both titles, convert them to lowercase, and remove everything except [a-z0-9]. If they are equal after that operation, we should also add "(The titles were different in case, whitespace or punctuation)" to the message, so the user won't have to scratch their head on why the title was changed, if they look the same.
Particularly bothersome is the cases where the titles only differ by whitespace, or punctuation or similar, so that when eyeballing the title, they appear to be the same.
Skara already rewrites the title in two cases:
1) If the title is just a bug number, we fetch the title from JBS.
2) If the bug number is prefixed by the project moniker (as in typical JBS bug references), this is removed to just keep the number.
I propose that we furthermore rewrite the title to actually match the JBS title, if the two differs. So instead of complaining on it as a blocker, we will just fix it for the user.
To clarify that this has happened, the bot should add a note along the lines of: "The title was rewritten to match the title on JBS. If you want to modify the title, you must modify the title in JBS. The previous title on this PR was: <previous title>"
And to help the user understand what has happened, we should do a simple comparison where we take both titles, convert them to lowercase, and remove everything except [a-z0-9]. If they are equal after that operation, we should also add "(The titles were different in case, whitespace or punctuation)" to the message, so the user won't have to scratch their head on why the title was changed, if they look the same.