issue and MR templates API - valid values are not documented #2265
Answered
by
dazza-codes
dazza-codes
asked this question in
Q&A
-
https://docs.gitlab.com/ee/api/projects.html#templates-for-issues-and-merge-requests
The question about the gitlab API is what kind of values are allowed, e.g. mr_template_file = ".gitlab/merge_request_templates/default.md"
mr_template_text = "Some useful MR template text in Markdown format"
if project.merge_commit_template is None:
# refer to option 1 solution because the text is in the file
project.merge_commit_template = mr_template_file
# or assign the actual text as if using the UI text box ?
project.merge_commit_template = mr_template_text It seems like the latter might be the API way of replicating the UI text boxes. |
Beta Was this translation helpful? Give feedback.
Answered by
dazza-codes
Sep 7, 2022
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dazza-codes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
project.merge_commit_template = mr_template_text
works. The text values also applies to other templates (issues and merge requests).