Skip to content

Commit

Permalink
Merge pull request #15 from nakamuraos/feature/update-example
Browse files Browse the repository at this point in the history
Feature/update example
  • Loading branch information
nakamuraos authored Mar 16, 2024
2 parents 382af84 + e52df72 commit 703320d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: nakamuraos/google-chat-notifications@v3.3.0
with:
title: Build
subtitle: ${{ github.event.head_commit.message }}
webhookUrl: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
threadKey: ${{ secrets.GOOGLE_CHAT_THREAD_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This repository is generated by [typescript-action](https://github.com/actions/t

```yaml
- name: Google Chat Notification
uses: nakamuraos/google-chat-notifications@v3.3.0
uses: nakamuraos/google-chat-notifications@v3.4.0
with:
title: Build
subtitle: ${{ github.event.head_commit.message }}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32597,7 +32597,7 @@ function notify(_a) {
name: `spaces/${spacesKey}/threads/${threadKey}`,
};
}
const response = yield axios.default.post(webhookUrl + body.thread ? '&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD' : '', body);
const response = yield axios.default.post(webhookUrl + (body.thread ? '&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD' : ''), body);
if (response.status !== 200) {
throw new Error(`Google Chat notification failed. response status=${response.status}`);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-chat-notifications",
"version": "3.3.0",
"version": "3.4.0",
"private": true,
"description": "Google Chat Notifications for GitHub Actions",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export async function notify({
}

const response = await axios.default.post(
webhookUrl + body.thread ? '&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD' : '',
webhookUrl + (body.thread ? '&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD' : ''),
body,
)
if (response.status !== 200) {
Expand Down

0 comments on commit 703320d

Please sign in to comment.