-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Support annotated tags when using create release API #31840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This adds a new field, "tag_message", that represents the message of the annotated tag.
Currently we don't return the tag message in the response. We don't store the tag message in the
I looked to see what the other forges were doing, and it appears that GitLab doesn't expose a similar field in its API response. See here. |
How about reuse |
Done, though the problems I see with this is that:
Not sure if these are potential problems |
Looks like Github API doesn't support to create tag. |
A 500 status code was thrown when passing a non-existent target to the create release API. This snapshot handles this error and instead throws a 404 status code. Discovered while working on #31840.
A 500 status code was thrown when passing a non-existent target to the create release API. This snapshot handles this error and instead throws a 404 status code. Discovered while working on go-gitea#31840.
I noticed in web router, the msg := ""
if len(form.Title) > 0 && form.AddTagMsg {
msg = form.Title + "\n\n" + form.Content
} Which has a different implementation between web and this API. |
I'm still not sure if its desirable to have both the tag message and the release description be the same. I also experimented with the GitHub API, and there really doesn't seem to be a way to create an annotated tag with this endpoint (even when specifying the This does look like it has been a sought after feature though. |
TBH, I think the initial approach is right (adds a new field, "tag_message", that represents the message of the annotated tag). The "Note" can't be reused, because the release note might be quite long, it is not the same as the tag's message. |
But that will create a non-compatible API with GH? Looks like GH doesn't have that field. |
Annotated tags can also be quite long(see our tags as an example). Looking at the GH API they are using "body", is that something we could use to ensure our API is similarly compliant? |
Do you mean that GitHub: "use body a release note" and "use body as tag message"? |
@kemzeb any conclusion? |
Looking back at this, I currently see the following approaches:
Not quite sure where we're leaning here but I'm open to other solutions |
I don't use these APIs, while at first glance, the
|
This adds a new field, "tag_message", that represents the message of the annotated tag.
Resolves #31835.