Commit d739b2cc authored by pburdette's avatar pburdette

Add child label to commit box

Adds a clickable label to the
commit box that will link back
to the parent pipeline that
triggered the child pipeline.

Generate locale/gitlab.pot file

Generate changelog entry for new feat

Child pipeline label tweaks

Change text from parent pipeline to
parent. Don't make entire tag clickable
but only the underlined parent text.

Fix if statement to use pipeline method

Refactor link so parentheses aren't underliend

Use surround method to clean up code

Generate gitlab.pot file and refactor
the way we are using a link to remove
the whitespace link_to puts in.

Fix weird formatting that happened

Add namespace for string translation

Add Pipelines namespace for string
translation to make i10n easier.

Genereate gitlab.pot for string translation
parent 9ce1c711
......@@ -502,6 +502,10 @@ module Ci
builds.skipped.after_stage(stage_idx).find_each(&:process)
end
def child?
false
end
def latest?
return false unless git_ref && commit.present?
......
......@@ -20,6 +20,11 @@
.well-segment.qa-pipeline-badges
.icon-container
= sprite_icon('flag')
- if @pipeline.child?
%span.js-pipeline-child.badge.badge-primary.has-tooltip{ title: s_("Pipelines|This is a child pipeline within the parent pipeline") }
= s_('Pipelines|Child pipeline')
= surround '(', ')' do
= link_to s_('Pipelines|parent'), pipeline_path(@pipeline.triggered_by_pipeline), class: 'text-white text-underline'
- if @pipeline.latest?
%span.js-pipeline-url-latest.badge.badge-success.has-tooltip{ title: _("Latest pipeline for the most recent commit on this branch") }
latest
......
---
title: Add child label to commit box
merge_request: 21323
author:
type: added
......@@ -12684,6 +12684,9 @@ msgstr ""
msgid "Pipelines|CI Lint"
msgstr ""
msgid "Pipelines|Child pipeline"
msgstr ""
msgid "Pipelines|Clear Runner Caches"
msgstr ""
......@@ -12717,9 +12720,15 @@ msgstr ""
msgid "Pipelines|There was an error fetching the pipelines. Try again in a few moments or contact your support team."
msgstr ""
msgid "Pipelines|This is a child pipeline within the parent pipeline"
msgstr ""
msgid "Pipelines|This project is not currently set up to run pipelines."
msgstr ""
msgid "Pipelines|parent"
msgstr ""
msgid "Pipeline|Commit"
msgstr ""
......
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