Skip to content
代码片段 群组 项目
未验证 提交 9a8b5b75 编辑于 作者: 路志远's avatar 路志远 提交者: GitLab
浏览文件

Update MR pipeline page message with permission details

上级 30fbdf7b
No related branches found
No related tags found
无相关合并请求
......@@ -197,7 +197,8 @@ export default {
i18n: {
runPipelinePopoverTitle: s__('Pipeline|Run merge request pipeline'),
runPipelinePopoverDescription: s__(
'Pipeline|To run a merge request pipeline, the jobs in the CI/CD configuration file %{linkStart}must be configured%{linkEnd} to run in merge request pipelines.',
`Pipeline|To run a merge request pipeline, the jobs in the CI/CD configuration file %{ciDocsLinkStart}must be configured%{ciDocsLinkEnd} to run in merge request pipelines
and you must have %{permissionDocsLinkStart}sufficient permissions%{permissionDocsLinkEnd} in the source project.`,
),
runPipelineText: s__('Pipeline|Run pipeline'),
emptyStateTitle: s__('Pipelines|There are currently no pipelines.'),
......@@ -205,6 +206,9 @@ export default {
mrPipelinesDocsPath: helpPagePath('ci/pipelines/merge_request_pipelines.md', {
anchor: 'prerequisites',
}),
userPermissionsDocsPath: helpPagePath('user/permissions.md', {
anchor: 'gitlab-cicd-permissions',
}),
runPipelinesInTheParentProjectHelpPath: helpPagePath(
'/ci/pipelines/merge_request_pipelines.html',
{
......@@ -241,7 +245,7 @@ export default {
>
<template #description>
<gl-sprintf :message="$options.i18n.runPipelinePopoverDescription">
<template #link="{ content }">
<template #ciDocsLink="{ content }">
<gl-link
:href="$options.mrPipelinesDocsPath"
target="_blank"
......@@ -249,6 +253,14 @@ export default {
>{{ content }}</gl-link
>
</template>
<template #permissionDocsLink="{ content }">
<gl-link
:href="$options.userPermissionsDocsPath"
target="_blank"
data-testid="user-permissions-docs-link"
>{{ content }}</gl-link
>
</template>
</gl-sprintf>
</template>
......
......@@ -36618,7 +36618,7 @@ msgstr ""
msgid "Pipeline|This pipeline ran on the contents of the merge request's source branch, not the target branch."
msgstr ""
 
msgid "Pipeline|To run a merge request pipeline, the jobs in the CI/CD configuration file %{linkStart}must be configured%{linkEnd} to run in merge request pipelines."
msgid "Pipeline|To run a merge request pipeline, the jobs in the CI/CD configuration file %{ciDocsLinkStart}must be configured%{ciDocsLinkEnd} to run in merge request pipelines and you must have %{permissionDocsLinkStart}sufficient permissions%{permissionDocsLinkEnd} in the source project."
msgstr ""
 
msgid "Pipeline|To see the remaining jobs, go to the %{boldStart}Jobs%{boldEnd} tab."
......@@ -39,6 +39,7 @@ describe('Pipelines table in Commits and Merge requests', () => {
const findTableRows = () => wrapper.findAllByTestId('pipeline-table-row');
const findModal = () => wrapper.findComponent(GlModal);
const findMrPipelinesDocsLink = () => wrapper.findByTestId('mr-pipelines-docs-link');
const findUserPermissionsDocsLink = () => wrapper.findByTestId('user-permissions-docs-link');
const findPipelinesTable = () => wrapper.findComponent(PipelinesTable);
const createComponent = ({ props = {}, mountFn = mountExtended } = {}) => {
......@@ -91,8 +92,12 @@ describe('Pipelines table in Commits and Merge requests', () => {
expect(findMrPipelinesDocsLink().attributes('href')).toBe(
'/help/ci/pipelines/merge_request_pipelines.md#prerequisites',
);
expect(findUserPermissionsDocsLink().attributes('href')).toBe(
'/help/user/permissions.md#gitlab-cicd-permissions',
);
expect(findEmptyState().text()).toContain(
'To run a merge request pipeline, the jobs in the CI/CD configuration file must be configured to run in merge request pipelines.',
'To run a merge request pipeline, the jobs in the CI/CD configuration file must be configured to run in merge request pipelines ' +
'and you must have sufficient permissions in the source project.',
);
});
});
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册