Fix commit status API creating branch pipeline even when ref is tag

What does this MR do and why?

Fix commit status API creating branch pipeline even when ref is tag

References

#589315

Screenshots or screen recordings

Before After
N / A N / A

How to set up and validate locally

  1. Checkout this branch and run gdk locally
  2. Create a new personal access token and copy/paste it somewhere to use in step 4
  3. Go to any project that has few commits and create a new tag from main branch eg v.2.2.2
  4. Call the commits status api to set the status for commit SHA
  5. Opens rails console with rails console command
  6. Check the newly created pipeline with pipeline = Ci::Pipeline.order(created_at: :desc).first
  7. Notice the tag property is properly set to true now
  8. Compare to master branch where it was always set to false
Edited by Rinku C

Merge request reports

Loading