rfcbot: update to recognise expanded template name #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
str_replace
calls in the syntax-fixing code to usestr_ireplace
, to fix a potential edge case where a capital letter at the start of an {{RFC}} tag could prevent the bot from successfully fixing its syntax.hopefully this won’t break anything
With respect to #13 (comment), I don’t see that the template being renamed means that the bot necessarily has to output the expanded version of the title — {{rfc}} will still redirect to {{request for comment}}, and so will work as normal as a template shortcut. As I see it, the main benefit here would be the actual template name being expanded for clarity - imo, there wouldn't be an issue with Legobot continuing to output {{rfc}}.
I also added support for the version without spaces ({{requestforcomment}}); which is currently marked as being deprecated, but which could be re-redirected to the main template if this PR gets merged.