Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

feat(cmdutils): Add project and group milestone prompt #824

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

zemzale
Copy link
Collaborator

@zemzale zemzale commented Aug 14, 2021

Description

When creating issues we prompted only project milestones. This would break workflows where group milestones were used.

This PR adds listing of all project related milestones in the prompt. That includes group and parent group milestones. I had to somehow normalize the milestone APIs because they are two different APIs. I didn't look into if the responses are identical(lack of time) but if it's needed we can always expand the current normalized structs to have all the needed attributes.
For this, we only need the title and ID so that is all I added.

Request to the group API only happens if the project namespace is group, otherwise the API would 404 with no group found error.

I also made fetching of milestones concurrent to improve the performance a bit.

Related Issue

Resolves #698

How Has This Been Tested?

Unit tests and testing against all kinds of group user configurations on Gitlab.com

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)

@zemzale zemzale changed the title feat(cmdutils): Add project and group milestone promt feat(cmdutils): Add project and group milestone prompt Aug 14, 2021
When creating issues we prompted only project milestones. This would
break workflows where group milestones were used.

They are two different APIs so we have to normalize their output and
merge it to one.

Issue profclems#698
@codecov
Copy link

codecov bot commented Aug 14, 2021

Codecov Report

Merging #824 (0cf8e61) into trunk (0456108) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##            trunk     #824   +/-   ##
=======================================
  Coverage   59.29%   59.30%           
=======================================
  Files          93       93           
  Lines        7353     7354    +1     
=======================================
+ Hits         4360     4361    +1     
  Misses       2613     2613           
  Partials      380      380           
Impacted Files Coverage Δ
commands/cmdutils/cmdutils.go 72.28% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0456108...0cf8e61. Read the comment docs.

@zemzale zemzale requested a review from profclems August 14, 2021 18:37
@profclems
Copy link
Owner

Sorry for the delay. This is a great feature and I want to have enough time to review it. I will review this today

Copy link
Owner

@profclems profclems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on this @zemzale! LGTM

@profclems profclems merged commit bce8b3f into profclems:trunk Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow group milestones to be used in issues
2 participants