0

I am using the GitHub API to add an annotated Git tag to my repository: link

I am able to do so. However, the tag name and the message (or description), are concatenated instead of separated, leaving me with an unreadably long title when viewing the tag page and a tiny bit of the end of the message field that actually overflows the title character limit and ends up in the description.

I was able to solve this on the command line using the "two -m" solution outlined on the following two questions, but there is no analogue in the tagging API.

Add line break to git commit -m from command line

How to include newline characters in git tag messages

Does anyone know how one could make the message field of the tagging json I'm sending NOT concatenate to the tag title?

Community
  • 1
  • 1
Connor L
  • 1
  • 2

1 Answers1

0

It is possible to solve the problem through the use of newlines. However, the newline character must be double-escaped to allow the json to parse.

thus, your "message": field should read: "\\n[yourcontent]"

This results in the message content appearing exclusively in the description, though the title will still have a colon (:) concatenated to it.

Connor L
  • 1
  • 2