Commit graph

8 commits

Author SHA1 Message Date
Takuya Noguchi
2b6307f6ad Enable RuboCop Style/RegexpLiteral 2018-02-01 02:06:07 +09:00
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
Douwe Maan
24b105e2e1 Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
Douwe Maan
38d84f8360 Select dependency linker based on file type 2017-05-12 19:09:30 -05:00
Douwe Maan
08706f6837 Implement auxiliary blob viewers 2017-05-10 20:07:04 -05:00
Douwe Maan
b7d8df503c Enable Style/MutableConstant 2017-02-23 09:31:56 -06: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