Skip to content

Commit

Permalink
feat: various changes (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev authored Jul 7, 2023
1 parent 8578ccc commit 7205b75
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sponsors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
name: Label Sponsors
runs-on: ubuntu-latest
steps:
- uses: JasonEtco/is-sponsor-label-action@v1
- uses: JasonEtco/is-sponsor-label-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 11 additions & 13 deletions lib/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ function cap(str: string, length: number) {
}

export default function createMessage(event) {
const embed = new EmbedBuilder();

embed.setAuthor({
name: "Sentry → Discord",
url: "https://sentrydiscord.dev",
});
const embed = new EmbedBuilder()
.setColor(getColor(parser.getLevel(event)))
.setAuthor({
name: event.project_name,
iconURL: "https://sentrydiscord.dev/icons/sentry.png",
})
.setFooter({
name: "Please consider sponsoring us!",
iconURL: "https://sentrydiscord.dev/sponsor.png",
})
.setTimestamp(parser.getTime(event))

const projectName = parser.getProject(event);

Expand All @@ -34,13 +39,6 @@ export default function createMessage(event) {
embed.setURL(parser.getLink(event));
}

embed.setTimestamp(parser.getTime(event));
embed.setFooter({
text: "Please consider sponsoring us!",
iconURL: "https://sentrydiscord.dev/sponsor.png",
});
embed.setColor(getColor(parser.getLevel(event)));

const fileLocation = parser.getFileLocation(event);
const snippet = cap(parser.getErrorCodeSnippet(event), 3900);

Expand Down

0 comments on commit 7205b75

Please sign in to comment.