Skip to content

Commit

Permalink
fix: object refrence
Browse files Browse the repository at this point in the history
  • Loading branch information
ethyaan committed Jul 6, 2023
1 parent f322119 commit bc59c88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16605,7 +16605,6 @@ const sendTextMessage = async (token, chat_id, text, thread_id = null, disable_w
appendFn('disable_notification', disable_notification);
URL.append('text', text);
URL.append('parse_mode', 'Markdown');
URL.append('disable_web_page_preview', true);

try {
await lib_axios.get(`/bot${token}/sendMessage`, {
Expand Down Expand Up @@ -16681,7 +16680,7 @@ const composer = (status, event) => {
},
"pull_request": {
fn: () => {
const { pull_request: { number, html_url: prURL } } = github.context;
const { pull_request: { number, html_url: prURL } } = github.context?.payload;
if (action === 'create') {
return `📦 PR [#${number}](${prURL}) has been created`;
} if (action === 'ready_for_review') {
Expand Down Expand Up @@ -16711,7 +16710,7 @@ const composer = (status, event) => {
},
"pull_request_review_comment": {
fn: () => {
const { pull_request: { number, html_url: prURL } } = github.context;
const { pull_request: { number, html_url: prURL } } = github.context?.payload;
return `📦 PR review comment on [#${number}](${prURL}) has been ${action}`;
}
},
Expand Down
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const sendTextMessage = async (token, chat_id, text, thread_id = null, disable_w
appendFn('disable_notification', disable_notification);
URL.append('text', text);
URL.append('parse_mode', 'Markdown');
URL.append('disable_web_page_preview', true);

try {
await axios.get(`/bot${token}/sendMessage`, {
Expand Down Expand Up @@ -117,7 +116,7 @@ const composer = (status, event) => {
},
"pull_request": {
fn: () => {
const { pull_request: { number, html_url: prURL } } = context;
const { pull_request: { number, html_url: prURL } } = context?.payload;
if (action === 'create') {
return `📦 PR [#${number}](${prURL}) has been created`;
} if (action === 'ready_for_review') {
Expand Down Expand Up @@ -147,7 +146,7 @@ const composer = (status, event) => {
},
"pull_request_review_comment": {
fn: () => {
const { pull_request: { number, html_url: prURL } } = context;
const { pull_request: { number, html_url: prURL } } = context?.payload;
return `📦 PR review comment on [#${number}](${prURL}) has been ${action}`;
}
},
Expand Down

0 comments on commit bc59c88

Please sign in to comment.