Cache issuable template names
What does this MR do?
First commit: don't use the basename of a file when detecting if it's a special file, but the full path.
Second commit: add this caching of special repository contents to issue and MR template names.
Are there points in the code the reviewer needs to double check?
Is the first commit valid? I think it is.
Why was this MR needed?
We spend a surprising amount of time when loading an issue page getting these names:
It also stops one source of repository access on issue load.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/27164.