Skip to content

Commit

Permalink
🎨 tweak title/subject
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Jul 19, 2024
1 parent 1216423 commit 9b47a8f
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public void apply(EventQueryContext qc) {
? payload.pullRequest
: payload.issue;

title = String.format("%s%s#%s %s",
title = String.format("%s[%s] #%s %s",
status,
payload.issue == null ? "PR " : "",
eventData.getRepoSlug(),
item.number, item.title);

yield Templates.itemEvent(title,
Expand All @@ -91,9 +91,8 @@ public void apply(EventQueryContext qc) {
: payload.issue;
DataCommonComment comment = payload.comment;

title = String.format("← %s - %s#%s %s",
comment.author.login,
payload.issue == null ? "PR " : "",
title = String.format("Re: [%s] #%s %s",
eventData.getRepoSlug(),
item.number, item.title);

yield Templates.commentEvent(title,
Expand All @@ -106,8 +105,9 @@ public void apply(EventQueryContext qc) {
EventPayload.DiscussionPayload payload = eventData.getEventPayload();
DataDiscussion discussion = payload.discussion;

title = String.format("%s#%s %s",
title = String.format("%s[%s] #%s %s",
status,
eventData.getRepoSlug(),
discussion.number, discussion.title);

yield Templates.itemEvent(title,
Expand All @@ -120,8 +120,9 @@ public void apply(EventQueryContext qc) {
DataDiscussion discussion = payload.discussion;
DataDiscussionComment comment = payload.comment;

title = String.format("↵ %s - #%s %s",
comment.author.login, discussion.number, discussion.title);
title = String.format("Re: [%s] #%s %s",
eventData.getRepoSlug(),
discussion.number, discussion.title);

yield Templates.commentEvent(title,
toHtmlBody(comment.body),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{#include includes/base}
{#repoSlug}{repoSlug}{/repoSlug}
{#ghUrl}{comment.url}{/ghUrl}
{#authorLogin}{comment.author.login}{/authorLogin}
{#authorUrl}{comment.author.url}{/authorUrl}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{#include includes/baseText}
{#repoSlug}{repoSlug}{/repoSlug}
{#dateTime}- comment [2] created by {comment.author.login} [3] on {comment.createdAt}

{/dateTime}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{#include includes/base}
{#repoSlug}{repoSlug}{/repoSlug}
{#ghUrl}{item.url}{/ghUrl}
{#authorLogin}{item.author.login}{/authorLogin}
{#authorUrl}{item.author.url}{/authorUrl}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{#include includes/baseText}
{#repoSlug}{repoSlug}{/repoSlug}
{#ghUrl}
[1]: {item.url}
{/ghUrl}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<tr>
<td style="vertical-align: top; padding: 0 1em;">
<header style="margin: 1em 0; padding: .5em;">
<span style="font-size: .9em;">[{#insert repoSlug}{/}]</span>
<h1 style="font-size: 1.1em; margin: .2em;"><a href="{#insert ghUrl}https://github.com{/}">{title}</a></h1>
</header>
<main style="margin: 1em 0; padding: .5em;"><div>{#insert body}No body{/}</div></main>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{@java.lang.String title}
[{#insert repoSlug}{/}]
{title} [1]

{#insert body}{/}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<tr>
<td style="vertical-align: top; padding: 0 1em;">
<header style="margin: 1em 0; padding: .5em;">
<span style="font-size: .9em;">[<a href="">{#insert repoSlug}{/}</a>]</span>
<h1 style="font-size: 1.1em; margin: .2em;"><a href="{#insert ghUrl}https://github.com{/}">{#insert title}{/}</a></h1>
</header>
<main style="margin: 1em 0; padding: .5em; font-family: monospace; font-size:13px;">{#insert body}No body{/}</main>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

[{#insert repoSlug}{/}]
{#insert title}{/} [1]

{#insert body}{/}
Expand Down

0 comments on commit 9b47a8f

Please sign in to comment.