summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repository/components/last_commit.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/repository/components/last_commit.vue')
-rw-r--r--app/assets/javascripts/repository/components/last_commit.vue10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/repository/components/last_commit.vue b/app/assets/javascripts/repository/components/last_commit.vue
index 2626bace363..0241c803514 100644
--- a/app/assets/javascripts/repository/components/last_commit.vue
+++ b/app/assets/javascripts/repository/components/last_commit.vue
@@ -39,7 +39,7 @@ export default {
path: this.currentPath.replace(/^\//, ''),
};
},
- update: data => {
+ update: (data) => {
const pipelines = data.project?.repository?.tree?.lastCommit?.pipelines?.edges;
return {
@@ -81,6 +81,10 @@ export default {
showCommitId() {
return this.commit?.sha?.substr(0, 8);
},
+ commitDescription() {
+ // Strip the newline at the beginning
+ return this.commit?.descriptionHtml?.replace(/^
/, '');
+ },
},
watch: {
currentPath() {
@@ -146,10 +150,10 @@ export default {
<timeago-tooltip :time="commit.authoredDate" tooltip-placement="bottom" />
</div>
<pre
- v-if="commit.descriptionHtml"
+ v-if="commitDescription"
:class="{ 'd-block': showDescription }"
class="commit-row-description gl-mb-3"
- v-html="commit.descriptionHtml"
+ v-html="commitDescription"
></pre>
</div>
<div class="commit-actions flex-row">