notion-github 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +12 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
@@ -4558,7 +4558,7 @@ var {
|
|
4558
4558
|
} = import_index.default;
|
4559
4559
|
|
4560
4560
|
// package.json
|
4561
|
-
var version = "1.0.
|
4561
|
+
var version = "1.0.2";
|
4562
4562
|
|
4563
4563
|
// src/commands/create/action.ts
|
4564
4564
|
var import_rest = require("@octokit/rest");
|
@@ -5959,13 +5959,22 @@ async function sendDiscordNotification(webhookUrl, prTitle, prUrl, reviewers, la
|
|
5959
5959
|
if (reviewers && reviewers.length > 0) {
|
5960
5960
|
message.push(``, `\u{1F465} ${lang === "ko" ? "\uB9AC\uBDF0\uC5B4" : "Reviewers"}: ${reviewers.map((r) => `@${r}`).join(", ")}`);
|
5961
5961
|
}
|
5962
|
+
const payload = { content: message.join("\n") };
|
5963
|
+
console.log("Sending Discord notification:", payload);
|
5962
5964
|
try {
|
5963
|
-
await lib_default(webhookUrl, {
|
5965
|
+
const response = await lib_default(webhookUrl, {
|
5964
5966
|
method: "POST",
|
5965
5967
|
headers: { "Content-Type": "application/json" },
|
5966
|
-
body: JSON.stringify(
|
5968
|
+
body: JSON.stringify(payload)
|
5967
5969
|
});
|
5970
|
+
if (!response.ok) {
|
5971
|
+
const errorText = await response.text();
|
5972
|
+
console.error("Discord API Error:", errorText);
|
5973
|
+
throw new Error(`Discord API returned ${response.status}`);
|
5974
|
+
}
|
5975
|
+
console.log("Discord notification sent successfully");
|
5968
5976
|
} catch (error) {
|
5977
|
+
console.error("Discord notification error:", error);
|
5969
5978
|
throw new Error(lang === "ko" ? "\uB514\uC2A4\uCF54\uB4DC \uC54C\uB9BC \uC804\uC1A1 \uC2E4\uD328" : "Failed to send Discord notification");
|
5970
5979
|
}
|
5971
5980
|
}
|