Skip to content

Use milestone ID instead of name for release API

What does this MR do and why?

Allows updating release milestones by id as well as title

Screenshots or screen recordings

POST http://gdk.test:3000/api/v4/projects/25/releases
{
	"name": "test release",
	"tag_name": "test",
	"ref": "9507c880a681964233cad640b620577255239fb3",
	"milestone_ids": [68]
}

...

201 Created
{
	"name": "test release",
	"tag_name": "test",
	...
	"milestones": [
		{
			"id": 68,
        ...

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. POST to a project/group releases to create a new release by specifying milestone_ids
  2. Check result to see if appropriate milestone has been added
  3. PUT to release URL (i.e. releases/RELEASE_ID) to update milestone_ids
  4. Note how result has updated to newly specified milestones

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #378442 (closed)

Edited by Allen Cook

Merge request reports

Loading