'How can I assign an issue to a milestone automatically using templates?

I am using GitLab issue templates and they work well. For example I have this one in .gitlab/issue_templates/foo.md:

# What is happening

# Share screenshots

[describe the issue]

/milestone 15
/confidential true

When I use it, it shows the headers and it also labels the issue as confidential, as described in the GitLab quick actions (FREE) doc:

Command Issue Merge request Epic Action
/confidential {check-circle} Yes {dotted-circle} No {dotted-circle} No Make confidential.
/label ~label1 ~label2 {check-circle} Yes {check-circle} Yes {check-circle} Yes Add one or more labels. Label names can also start without a tilde (~), but mixed syntax is not supported.
/milestone %milestone {check-circle} Yes {check-circle} Yes {dotted-circle} No Set milestone.

However, the piece that does not work is the one that should the Milestone "foo" with the ID 15 I refer to.

How can I assign a Milestone with the name "foo" automatically? Shouldn't /milestone <id> suffice?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source