Skip to content

Commit bc59c88

Browse files
committed
fix: object refrence
1 parent f322119 commit bc59c88

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

dist/index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -16605,7 +16605,6 @@ const sendTextMessage = async (token, chat_id, text, thread_id = null, disable_w
1660516605
appendFn('disable_notification', disable_notification);
1660616606
URL.append('text', text);
1660716607
URL.append('parse_mode', 'Markdown');
16608-
URL.append('disable_web_page_preview', true);
1660916608

1661016609
try {
1661116610
await lib_axios.get(`/bot${token}/sendMessage`, {
@@ -16681,7 +16680,7 @@ const composer = (status, event) => {
1668116680
},
1668216681
"pull_request": {
1668316682
fn: () => {
16684-
const { pull_request: { number, html_url: prURL } } = github.context;
16683+
const { pull_request: { number, html_url: prURL } } = github.context?.payload;
1668516684
if (action === 'create') {
1668616685
return `📦 PR [#${number}](${prURL}) has been created`;
1668716686
} if (action === 'ready_for_review') {
@@ -16711,7 +16710,7 @@ const composer = (status, event) => {
1671116710
},
1671216711
"pull_request_review_comment": {
1671316712
fn: () => {
16714-
const { pull_request: { number, html_url: prURL } } = github.context;
16713+
const { pull_request: { number, html_url: prURL } } = github.context?.payload;
1671516714
return `📦 PR review comment on [#${number}](${prURL}) has been ${action}`;
1671616715
}
1671716716
},

index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const sendTextMessage = async (token, chat_id, text, thread_id = null, disable_w
4141
appendFn('disable_notification', disable_notification);
4242
URL.append('text', text);
4343
URL.append('parse_mode', 'Markdown');
44-
URL.append('disable_web_page_preview', true);
4544

4645
try {
4746
await axios.get(`/bot${token}/sendMessage`, {
@@ -117,7 +116,7 @@ const composer = (status, event) => {
117116
},
118117
"pull_request": {
119118
fn: () => {
120-
const { pull_request: { number, html_url: prURL } } = context;
119+
const { pull_request: { number, html_url: prURL } } = context?.payload;
121120
if (action === 'create') {
122121
return `📦 PR [#${number}](${prURL}) has been created`;
123122
} if (action === 'ready_for_review') {
@@ -147,7 +146,7 @@ const composer = (status, event) => {
147146
},
148147
"pull_request_review_comment": {
149148
fn: () => {
150-
const { pull_request: { number, html_url: prURL } } = context;
149+
const { pull_request: { number, html_url: prURL } } = context?.payload;
151150
return `📦 PR review comment on [#${number}](${prURL}) has been ${action}`;
152151
}
153152
},

0 commit comments

Comments
 (0)