diff --git a/source/plugins/activity/index.mjs b/source/plugins/activity/index.mjs index e640573b6be..d8777e6cb99 100644 --- a/source/plugins/activity/index.mjs +++ b/source/plugins/activity/index.mjs @@ -119,8 +119,8 @@ export default async function({login, data, rest, q, account, imports}, {enabled case "ReleaseEvent": { if (!["published"].includes(payload.action)) return null - const {action, release:{name, prerelease, draft, body:content}} = payload - return {type:"release", actor, timestamp, repo, action, name, prerelease, draft, content:await imports.markdown(content, {mode:markdown, codelines})} + const {action, release:{name, tag_name, prerelease, draft, body:content}} = payload + return {type:"release", actor, timestamp, repo, action, name:name || tag_name, prerelease, draft, content:await imports.markdown(content, {mode:markdown, codelines})} } //Starred a repository case "WatchEvent": { diff --git a/source/templates/classic/partials/activity.ejs b/source/templates/classic/partials/activity.ejs index 32bca413def..dd6a773d44d 100644 --- a/source/templates/classic/partials/activity.ejs +++ b/source/templates/classic/partials/activity.ejs @@ -23,14 +23,16 @@
<% if (/^ref/.test(type)) { %>
- <% if (event.ref.type === "branch") { %> + <% if (event.ref.type === "repository") { %> + + <% } else if (event.ref.type === "branch") { %> <% } else { %> <% } %>
<%- /create/.test(type) ? `${_("C")}reated new` : `${_("D")}eleted` %> - <%= event.ref.type %> <%= event.ref.name %> in <%= repo %> + <%= event.ref.type %> <% if (event.ref.type !== "repository") { %> <%= event.ref.name %> in <% } %> <%= repo %>
<% } %>