Skip to content

Commit

Permalink
feat: icon url and cat images
Browse files Browse the repository at this point in the history
  • Loading branch information
coltenkrauter committed Sep 9, 2024
1 parent 898697b commit c41c146
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42182,13 +42182,15 @@ class SlackClient {
const payload = {
blocks: batch,
channel,
icon_emoji: ':github_octocat:',
icon_url: 'https://github.com/krauters/github-notifier/blob/images/images/teddy-cat-square.png?raw=true',
// icon_emoji: ':github_octocat:',
text,
unfurl_links: false,
unfurl_media: false,
username: 'GitHub Notifier',
};
const response = await this.client.chat.postMessage(payload);
console.dir(response, { depth: null });
console.log(`Posted batch [${batchNumber++}] to Slack channel [${channel}] with success [${response.ok}]`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Binary file added images/teddy-cat-square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/teddy-cat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/utils/slack/slack-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,17 @@ export class SlackClient {
const payload = {
blocks: batch,
channel,
icon_emoji: ':github_octocat:',
icon_url: 'https://github.com/krauters/github-notifier/blob/images/images/teddy-cat-square.png?raw=true',

Check failure on line 149 in src/utils/slack/slack-client.ts

View workflow job for this annotation

GitHub Actions / test

Replace `·` with `⏎↹↹↹↹↹↹`

// icon_emoji: ':github_octocat:',
text,
unfurl_links: false,
unfurl_media: false,
username: 'GitHub Notifier',
}

const response = await this.client.chat.postMessage(payload)
console.dir(response, { depth: null })
console.log(
`Posted batch [${batchNumber++}] to Slack channel [${channel}] with success [${response.ok}]`,
)
Expand Down

0 comments on commit c41c146

Please sign in to comment.