Skip to content

Deprecate `include_parent_milestones ` in favor of `include_ancestors`

What does this MR do and why?

Currently the GraphQL API uses includeAncestors for the Group.milestones and Project.milestones query, while the REST API uses include_parent_milestones in https://docs.gitlab.com/ee/api/group_milestones.html#list-group-milestones and https://docs.gitlab.com/ee/api/milestones.html

Since we're going to be adding include_descendant to the Group milestone REST API, and the GraphQL API uses includeDescendants, let's make the parameters consistent. include_parent_milestones will be deprecated and replaced with include_ancestors

So you can now do

  • new: curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/6/milestones?include_ancestors=true"
  • still works: curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/6/milestones?include_parent_milestones=true"

  • new: curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/groups/6/milestones?include_ancestors=true"
  • still works: curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/groups/6/milestones?include_parent_milestones=true"

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 #433298 (closed)

Edited by Brett Walker

Merge request reports

Loading