Commit 93f38f7e authored by Mike Greiling's avatar Mike Greiling

Merge branch 'leipert-improve-bundle-size-analysis' into 'master'

Webpack bundle size analysis: Use Job ID

See merge request gitlab-org/gitlab!32712
parents 5622b30d 058f186c
/* eslint-disable func-names, guard-for-in, no-restricted-syntax, no-lonely-if, no-continue */
/* eslint-disable func-names, no-continue */
/* global CommentsStore */
import $ from 'jquery';
......@@ -42,13 +42,13 @@ const JumpToDiscussion = Vue.extend({
},
lastResolvedId() {
let lastId;
for (const discussionId in this.discussions) {
Object.keys(this.discussions).forEach(discussionId => {
const discussion = this.discussions[discussionId];
if (!discussion.isResolved()) {
lastId = discussion.id;
}
}
});
return lastId;
},
},
......@@ -95,12 +95,10 @@ const JumpToDiscussion = Vue.extend({
if (unresolvedDiscussionCount === 1) {
hasDiscussionsToJumpTo = false;
}
} else {
} else if (unresolvedDiscussionCount === 0) {
// If there are no unresolved discussions on the diffs tab at all,
// there are no discussions to jump to.
if (unresolvedDiscussionCount === 0) {
hasDiscussionsToJumpTo = false;
}
hasDiscussionsToJumpTo = false;
}
} else if (activeTab !== 'show') {
// If we are on the commits or builds tabs,
......
......@@ -22,7 +22,7 @@ analyze_cmd = [
# from master that was merged into for the merged pipeline.
comparison_cmd = [
"webpack-compare-reports",
"--from-sha #{gitlab.mr_json["diff_refs"]["start_sha"]}",
"--job #{ENV["CI_JOB_ID"]}",
"--to-file #{analysis_result}",
"--html ./bundle-size-review/comparison.html",
"--markdown #{markdown_result}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment