diff --git a/.rubocop_manual_todo.yml b/.rubocop_manual_todo.yml index a7d568e5ed2..4f15763d935 100644 --- a/.rubocop_manual_todo.yml +++ b/.rubocop_manual_todo.yml @@ -491,10 +491,6 @@ RSpec/EmptyLineAfterFinalLetItBe: - ee/spec/graphql/mutations/issues/set_epic_spec.rb - ee/spec/graphql/mutations/requirements_management/export_requirements_spec.rb - ee/spec/graphql/mutations/vulnerabilities/create_external_issue_link_spec.rb - - ee/spec/graphql/resolvers/ci/code_coverage_activities_resolver_spec.rb - - ee/spec/graphql/resolvers/epics_resolver_spec.rb - - ee/spec/graphql/resolvers/geo/geo_node_resolver_spec.rb - - ee/spec/graphql/resolvers/incident_management/oncall_shifts_resolver_spec.rb - ee/spec/graphql/types/issue_type_spec.rb - ee/spec/helpers/ee/graph_helper_spec.rb - ee/spec/helpers/ee/issues_helper_spec.rb @@ -801,8 +797,6 @@ RSpec/EmptyLineAfterFinalLetItBe: - spec/lib/gitlab/auth/otp/strategies/forti_token_cloud_spec.rb - spec/lib/gitlab/auth_spec.rb - spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb - - spec/lib/gitlab/checks/project_created_spec.rb - - spec/lib/gitlab/checks/project_moved_spec.rb - spec/lib/gitlab/ci/build/policy/changes_spec.rb - spec/lib/gitlab/ci/config/external/file/local_spec.rb - spec/lib/gitlab/ci/config/external/file/project_spec.rb @@ -840,12 +834,6 @@ RSpec/EmptyLineAfterFinalLetItBe: - spec/lib/gitlab/github_import/importer/pull_request_review_importer_spec.rb - spec/lib/gitlab/github_import/milestone_finder_spec.rb - spec/lib/gitlab/gl_repository/repo_type_spec.rb - - spec/lib/gitlab/graphql/batch_key_spec.rb - - spec/lib/gitlab/graphql/docs/renderer_spec.rb - - spec/lib/gitlab/graphql/loaders/batch_lfs_oid_loader_spec.rb - - spec/lib/gitlab/graphql/markdown_field_spec.rb - - spec/lib/gitlab/graphql/pagination/keyset/connection_spec.rb - - spec/lib/gitlab/graphql/pagination/keyset/last_items_spec.rb - spec/lib/gitlab/group_search_results_spec.rb - spec/lib/gitlab/hook_data/issue_builder_spec.rb - spec/lib/gitlab/hook_data/merge_request_builder_spec.rb diff --git a/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue b/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue index d3d1fd8ddc3..e6bd0f53672 100644 --- a/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue +++ b/app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue @@ -129,7 +129,7 @@ export default { @@ -169,7 +169,7 @@ export default { id="service_project_key" v-model="projectKey" name="service[project_key]" - :placeholder="s__('JiraService|e.g. AB')" + :placeholder="s__('JiraService|For example, AB')" :required="enableJiraIssues" :state="validProjectKey" :disabled="!enableJiraIssues" diff --git a/app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue b/app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue index 03b1e8586ae..a17378edafd 100644 --- a/app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue +++ b/app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue @@ -144,7 +144,7 @@ export default { label-for="service[trigger]" :description=" s__( - 'Integrations|When a Jira issue is mentioned in a commit or merge request a remote link and comment (if enabled) will be created.', + 'Integrations|When a Jira issue is mentioned in a commit or merge request a remote link and comment (if enabled) is created.', ) " > diff --git a/app/assets/javascripts/notes/components/discussion_notes.vue b/app/assets/javascripts/notes/components/discussion_notes.vue index 0f74d78c8e0..dfe2763d8bd 100644 --- a/app/assets/javascripts/notes/components/discussion_notes.vue +++ b/app/assets/javascripts/notes/components/discussion_notes.vue @@ -121,6 +121,7 @@ export default { :is="componentName(firstNote)" :note="componentData(firstNote)" :line="line || diffLine" + :discussion-file="discussion.diff_file" :commit="commit" :help-page-path="helpPagePath" :show-reply-button="userCanReply" @@ -167,6 +168,7 @@ export default { v-for="(note, index) in discussion.notes" :key="note.id" :note="componentData(note)" + :discussion-file="discussion.diff_file" :help-page-path="helpPagePath" :line="diffLine" :discussion-root="index === 0" diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue index 0b5abacc963..0feb77be653 100644 --- a/app/assets/javascripts/notes/components/noteable_note.vue +++ b/app/assets/javascripts/notes/components/noteable_note.vue @@ -48,6 +48,11 @@ export default { required: false, default: null, }, + discussionFile: { + type: Object, + required: false, + default: null, + }, helpPagePath: { type: String, required: false, @@ -167,12 +172,18 @@ export default { return commentLineOptions(lines, this.commentLineStart, this.line.line_code); }, diffFile() { + let fileResolvedFromAvailableSource; + if (this.commentLineStart.line_code) { const lineCode = this.commentLineStart.line_code.split('_')[0]; - return this.getDiffFileByHash(lineCode); + fileResolvedFromAvailableSource = this.getDiffFileByHash(lineCode); } - return null; + if (!fileResolvedFromAvailableSource && this.discussionFile) { + fileResolvedFromAvailableSource = this.discussionFile; + } + + return fileResolvedFromAvailableSource || null; }, }, created() { diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component.vue b/app/assets/javascripts/pipelines/components/graph/graph_component.vue index d7a7fc9c375..6ff7b356438 100644 --- a/app/assets/javascripts/pipelines/components/graph/graph_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/graph_component.vue @@ -2,7 +2,7 @@ import { reportToSentry } from '../../utils'; import LinkedGraphWrapper from '../graph_shared/linked_graph_wrapper.vue'; import LinksLayer from '../graph_shared/links_layer.vue'; -import { DOWNSTREAM, MAIN, UPSTREAM, ONE_COL_WIDTH } from './constants'; +import { DOWNSTREAM, MAIN, UPSTREAM, ONE_COL_WIDTH, STAGE_VIEW } from './constants'; import LinkedPipelinesColumn from './linked_pipelines_column.vue'; import StageColumnComponent from './stage_column_component.vue'; import { validateConfigPaths } from './utils'; @@ -25,11 +25,20 @@ export default { type: Object, required: true, }, + viewType: { + type: String, + required: true, + }, isLinkedPipeline: { type: Boolean, required: false, default: false, }, + pipelineLayers: { + type: Array, + required: false, + default: () => [], + }, type: { type: String, required: false, @@ -63,8 +72,8 @@ export default { downstreamPipelines() { return this.hasDownstreamPipelines ? this.pipeline.downstream : []; }, - graph() { - return this.pipeline.stages; + layout() { + return this.isStageView ? this.pipeline.stages : this.generateColumnsFromLayersList(); }, hasDownstreamPipelines() { return Boolean(this.pipeline?.downstream?.length > 0); @@ -72,12 +81,18 @@ export default { hasUpstreamPipelines() { return Boolean(this.pipeline?.upstream?.length > 0); }, + isStageView() { + return this.viewType === STAGE_VIEW; + }, metricsConfig() { return { path: this.configPaths.metricsPath, collectMetrics: true, }; }, + shouldHideLinks() { + return this.isStageView; + }, // The show downstream check prevents showing redundant linked columns showDownstreamPipelines() { return ( @@ -101,6 +116,26 @@ export default { this.getMeasurements(); }, methods: { + generateColumnsFromLayersList() { + return this.pipelineLayers.map((layers, idx) => { + /* + look up the groups in each layer, + then add each set of layer groups to a stage-like object + */ + + const groups = layers.map((id) => { + const { stageIdx, groupIdx } = this.pipeline.stagesLookup[id]; + return this.pipeline.stages?.[stageIdx]?.groups?.[groupIdx]; + }); + + return { + name: '', + id: `layer-${idx}`, + status: { action: null }, + groups: groups.filter(Boolean), + }; + }); + }, getMeasurements() { this.measurements = { width: this.$refs[this.containerId].scrollWidth, @@ -147,29 +182,31 @@ export default { :linked-pipelines="upstreamPipelines" :column-title="__('Upstream')" :type="$options.pipelineTypeConstants.UPSTREAM" + :view-type="viewType" @error="onError" />