This is an automated email from the ASF dual-hosted git repository.
weitingchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 45d629e1d [GLUTEN-6915][CORE]Fix listComments TypeError (#6919)
45d629e1d is described below
commit 45d629e1d79838b1e0259fe88f2bf82178330b32
Author: Wei-Ting Chen <[email protected]>
AuthorDate: Mon Aug 19 16:57:37 2024 +0800
[GLUTEN-6915][CORE]Fix listComments TypeError (#6919)
* Fix listComments TypeError
* Fix listComments in title_check.js
* fix typo.
* Update github rest
* add per_page
* fix
* enable debug
* remove debug
---
.github/workflows/dev_cron/issues_link.js | 4 ++--
.github/workflows/dev_cron/title_check.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/dev_cron/issues_link.js
b/.github/workflows/dev_cron/issues_link.js
index 596bad758..e47ecb50a 100644
--- a/.github/workflows/dev_cron/issues_link.js
+++ b/.github/workflows/dev_cron/issues_link.js
@@ -35,7 +35,7 @@ async function haveComment(github, context,
pullRequestNumber, body) {
page: 1
};
while (true) {
- const response = await github.issues.listComments(options);
+ const response = await github.rest.issues.listComments(options);
if (response.data.some(comment => comment.body === body)) {
return true;
}
@@ -52,7 +52,7 @@ async function commentISSUESURL(github, context,
pullRequestNumber, issuesID) {
if (await haveComment(github, context, pullRequestNumber, issuesURL)) {
return;
}
- await github.issues.createComment({
+ await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequestNumber,
diff --git a/.github/workflows/dev_cron/title_check.js
b/.github/workflows/dev_cron/title_check.js
index e553e20b0..1e6df340f 100644
--- a/.github/workflows/dev_cron/title_check.js
+++ b/.github/workflows/dev_cron/title_check.js
@@ -25,7 +25,7 @@ function haveISSUESID(title) {
}
async function commentOpenISSUESIssue(github, context, pullRequestNumber) {
- const {data: comments} = await github.issues.listComments({
+ const {data: comments} = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequestNumber,
@@ -36,7 +36,7 @@ async function commentOpenISSUESIssue(github, context,
pullRequestNumber) {
}
const commentPath = ".github/workflows/dev_cron/title_check.md";
const comment = fs.readFileSync(commentPath).toString();
- await github.issues.createComment({
+ await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequestNumber,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]