Commit graph

4 commits

Author SHA1 Message Date
Sean McGivern
b7303b65b1 Cache issuable template names
We were looking these up on each request to an issue page, because the form is
pre-filled, as is the template dropdown. That was unnecessary: we could just
treat these as 'special' repository files (like the rendered README) and cache
them in Redis until they change on a push.
2017-10-12 13:26:03 +01:00
Sean McGivern
218e1f0963 Match full file path in FileDetector
The basename appears to have been a holdover from the past - it doesn't look
necessary now. Some of the regexes were unanchored on one side, so explicitly
ensure that they only match the root.

Apart from that, this means that pushing to foo/README.md will no longer
invalidate the main README cache for a project.
2017-10-12 11:13:37 +01:00
Grzegorz Bizon
0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Yorick Peterse
df5548e19e
Unify detecting of special repository files
This moves the logic of detecting special repository files (e.g. a
README or a Koding configuration file) to a single class:
Gitlab::FileDetector. Moving this logic into a single place allows this
to be re-used more easily.

This commit also changes Repository#gitlab_ci_yaml so that its cached
similar to other data (e.g. the Koding configuration file).
2016-11-21 12:51:40 +01:00