Skip to content

Add pipeline status support to `projects_list_item.vue`

Background

In &13066 (closed) we are working on moving Your work -> Projects to Vue and use a GraphQL query as the data source.

Problem

Currently we show the latest pipeline status on Your work -> Projects but the GraphQL query doesn't yet support this.

How it is currently done

Logic comes from app/helpers/projects_helper.rb#L227

This is where it gets a little complicated.

  • If the last_pipeline_from_pipeline_status feature flag is enabled
    • Grab the project pipeline status, get the commit from that pipeline status, then get the pipeline from that commit
  • else
    • Grab the latest commit, then get the last pipeline

Implementation guide

Edited by Peter Hegman