Skip to content
Snippets Groups Projects

fix(ci get): do not require branch if pipelineID is given

Merged Anatoli Babenia requested to merge gitlab-community/cli:ci-get-pipeline-no-branch into main
All threads resolved!

Description

  • fix(ci get): do not require branch if pipelineID is given
  • Do not try to process branch when pipelineID is known
  • Prevents such ci get from failures in detached HEAD state

Fixes #7741 (closed)

Related Issues

Resolves #[issue_number]

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by Anatoli Babenia

Merge request reports

Merge train pipeline #1669520110 passed

Merge train pipeline passed for 997911ce

Test coverage 63.50% (0.80%) from 1 job
Approved by
License Compliance test metrics results are being parsed
Code Quality is loading
Test summary results are being parsed

Merged by Tomas VikTomas Vik 2 weeks ago (Feb 13, 2025 12:02pm UTC)

Merge details

  • Changes merged into main with b7da5851 (commits were squashed).
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline passed for b7da5851 on main

Test coverage 63.50% (0.80%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @dmakovey, could you please help reviewing this Community contribution? I don't have sufficient expertise in this area.

  • Denys Mishunov requested review from @dmakovey and removed review request for @dmishunov

    requested review from @dmakovey and removed review request for @dmishunov

  • added 1 commit

    Compare with previous version

  • Anatoli Babenia resolved all threads

    resolved all threads

  • added devopscd label

  • Thank you @abitrolly , visually changes look OK to me. I'll take a look at functional impact a bit later to confirm results of visual inspection.

  • Anatoli Babenia added 22 commits

    added 22 commits

    Compare with previous version

  • Author Contributor

    Rebased.

  • Anatoli Babenia added 22 commits

    added 22 commits

    Compare with previous version

  • Anatoli Babenia marked the checklist item Bug fix (non-breaking change which fixes an issue) as completed

    marked the checklist item Bug fix (non-breaking change which fixes an issue) as completed

  • Vitali Tatarintev requested review from @ck3g

    requested review from @ck3g

  • Note for a maintainer

    Steps to reproduce:

    git checkout main
    PIPELINE_ID=$(glab ci get | sed -n '/^[[:space:]]*id:/s/^[[:space:]]*id:[[:space:]]*//p')
    git checkout HEAD^
    glab ci get --pipeline-id $PIPELINE_ID
    Before
    → glab ci get --pipeline-id $PIPELINE_ID
    you're not on any Git branch (a 'detached HEAD' state).
    
    After
    → glab ci get --pipeline-id $PIPELINE_ID
    # Pipeline:
    id:           1664921469
    ...
  • Vitali Tatarintev changed milestone to %17.9

    changed milestone to %17.9

  • Vitali Tatarintev approved this merge request

    approved this merge request

  • Vitali Tatarintev requested review from @viktomas

    requested review from @viktomas

  • Tomas Vik approved this merge request

    approved this merge request

  • Tomas Vik resolved all threads

    resolved all threads

  • Reviewer roulette

    Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category and by a maintainer in all other categories.

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.

    Reviewer Maintainer
    @faleksic profile link current availability (UTC+1) @timofurrer profile link current availability (UTC+1)

    Generated by :no_entry_sign: Danger

  • merged

  • Tomas Vik mentioned in commit b7da5851

    mentioned in commit b7da5851

  • Hi @abitrolly :wave:

    :tada: See where you rank! Check your spot on the contributor leaderboard and unlock rewards.


    How was your code review experience with this merge request? Please tell us how we can continue to iterate and improve:

    1. React with a :thumbsup: or a :thumbsdown: on this comment to describe your experience.
    2. Create a new comment starting with @gitlab-bot feedback below, and leave any additional feedback you have for us in the comment.

    As a benefit of being a GitLab Community Contributor, you have access to GitLab Duo, our AI-powered features. With Code Suggestions, Chat, Root Cause Analysis and more AI-powered features, GitLab Duo helps to boost your efficiency and effectiveness by reducing the time required to write and understand code and pipelines. Visit the GitLab Duo documentation to learn more about the benefits.

    Thanks for your help! :heart:

    This message was generated automatically. Improve it or delete it.

  • Please register or sign in to reply
    Loading