summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-11 16:55:06 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-05-11 16:55:06 +0000
commitefed14d4783956dff415a40188f0f6db2385bb29 (patch)
tree2fa259e939947f3decd77cb0e21df5bb073dd1a9 /app/assets
parentb562b8816634681ce6346561a0418c4066bf19b4 (diff)
parent50181499bf21d8cc691896fe446e7435ad627be2 (diff)
downloadgitlab-ce-efed14d4783956dff415a40188f0f6db2385bb29.tar.gz
Merge branch 'winh-pipeline-author-link' into 'master'
Link to commit author user page from pipelines Closes #29368 See merge request !11100
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/vue_shared/components/pipelines_table_row.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/app/assets/javascripts/vue_shared/components/pipelines_table_row.js b/app/assets/javascripts/vue_shared/components/pipelines_table_row.js
index fbae85c85f6..7ac7ceaa4e5 100644
--- a/app/assets/javascripts/vue_shared/components/pipelines_table_row.js
+++ b/app/assets/javascripts/vue_shared/components/pipelines_table_row.js
@@ -62,10 +62,12 @@ export default {
commitAuthor() {
let commitAuthorInformation;
+ if (!this.pipeline || !this.pipeline.commit) {
+ return null;
+ }
+
// 1. person who is an author of a commit might be a GitLab user
- if (this.pipeline &&
- this.pipeline.commit &&
- this.pipeline.commit.author) {
+ if (this.pipeline.commit.author) {
// 2. if person who is an author of a commit is a GitLab user
// he/she can have a GitLab avatar
if (this.pipeline.commit.author.avatar_url) {
@@ -77,11 +79,8 @@ export default {
avatar_url: this.pipeline.commit.author_gravatar_url,
});
}
- }
-
- // 4. If committer is not a GitLab User he/she can have a Gravatar
- if (this.pipeline &&
- this.pipeline.commit) {
+ // 4. If committer is not a GitLab User he/she can have a Gravatar
+ } else {
commitAuthorInformation = {
avatar_url: this.pipeline.commit.author_gravatar_url,
web_url: `mailto:${this.pipeline.commit.author_email}`,