summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-10 13:59:46 +0000
committerRémy Coutable <remy@rymai.me>2016-11-15 18:39:15 +0100
commit76b9114100795f5e6d674f0fe726d5d868f97805 (patch)
treea701672b61270093360d89dad55569565b9b5399
parent33f9012fd39a7fcbb43d1ff022668cdfad6ecb21 (diff)
downloadgitlab-ce-76b9114100795f5e6d674f0fe726d5d868f97805.tar.gz
Merge branch 'fix-cache-for-commit-status' into 'master'
Fix cache for commit status in commits list to respect branches Fix cache for commit status in commits list to respect branches Closes #24324 See merge request !7372
-rw-r--r--app/views/projects/commits/_commit.html.haml2
-rw-r--r--changelogs/unreleased/fix-cache-for-commit-status.yml4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index 9f80a974d64..34855c54176 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -6,7 +6,7 @@
- note_count = notes.user.count
- cache_key = [project.path_with_namespace, commit.id, current_application_settings, note_count]
-- cache_key.push(commit.status) if commit.status
+- cache_key.push(commit.status(ref)) if commit.status(ref)
= cache(cache_key, expires_in: 1.day) do
%li.commit.js-toggle-container{ id: "commit-#{commit.short_id}" }
diff --git a/changelogs/unreleased/fix-cache-for-commit-status.yml b/changelogs/unreleased/fix-cache-for-commit-status.yml
new file mode 100644
index 00000000000..eb4e96e75ae
--- /dev/null
+++ b/changelogs/unreleased/fix-cache-for-commit-status.yml
@@ -0,0 +1,4 @@
+---
+title: Fix cache for commit status in commits list to respect branches
+merge_request: 7372
+author: