From 316a07b9a4da28c4fb967d918518571e14909b04 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Wed, 3 Aug 2022 15:01:23 +0000 Subject: [PATCH] disable comment and issue creation from actions --- README.adoc | 1 + action.js | 41 ++++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/README.adoc b/README.adoc index 8624614e9..255be2c7d 100644 --- a/README.adoc +++ b/README.adoc @@ -541,6 +541,7 @@ Not mentioned in other sections: ** on <>: https://github.com/github/gov-takedowns/blob/master/China/2021/2021-01-29-BNIA.md * https://github.com/ycjyy/ycjyy[]. Several news reposts on comments, e.g. https://github.com/ycjyy/ycjyy/issues/302[]. Particularly likes the site https://www.aboluowang.com/index.html 阿波罗综合新闻网 "Appolo Comprehensive News Website" * https://github.com/u2017/u2017/wiki has an anti-CCP wiki. Likely <> believer given the imagery on the index page. +* https://github.com/TaiduGousima/Fuck-cirosantilli Interesting users: diff --git a/action.js b/action.js index da11c042b..e129657a9 100755 --- a/action.js +++ b/action.js @@ -165,22 +165,24 @@ if (!isComment) { // Make the request. try { const octokit = new github.getOctokit(process.env.GITHUB_TOKEN); - const new_comment = octokit.issues.createComment({ - owner: payload.repository.owner.login, - repo: payload.repository.name, - issue_number: payload.issue.number, - body: replyBody, - }); + // https://github.com/cirosantilli/china-dictatorship/issues/1330 + //const new_comment = octokit.issues.createComment({ + // owner: payload.repository.owner.login, + // repo: payload.repository.name, + // issue_number: payload.issue.number, + // body: replyBody, + //}); let html_url if (isComment) { const title = (`@${author}: ` + noQuoteArray.join('\n').replaceAll('\n', ' ')).substring(0, 255) html_url = payload.comment.html_url - const new_issue = octokit.issues.create({ - owner: payload.repository.owner.login, - repo: payload.repository.name, - title, - body: html_url + '\n\n' + replyBody, - }) + // https://github.com/cirosantilli/china-dictatorship/issues/1330 + //const new_issue = octokit.issues.create({ + // owner: payload.repository.owner.login, + // repo: payload.repository.name, + // title, + // body: html_url + '\n\n' + replyBody, + //}) } else { // Update labels. await octokit.issues.update({ @@ -224,13 +226,14 @@ try { const title = match[1] const link = match[2] const body = lines[4] - const new_issue_duty = await octokit.issues.create({ - owner: payload.repository.owner.login, - repo: payload.repository.name, - title: title + ' ' + link, - body: content.data.html_url + '\n\n' + link + '\n\n' + html_url + '\n\n' + body, - labels: ['duty-machine'], - }) + // https://github.com/cirosantilli/china-dictatorship/issues/1330 + //const new_issue_duty = await octokit.issues.create({ + // owner: payload.repository.owner.login, + // repo: payload.repository.name, + // title: title + ' ' + link, + // body: content.data.html_url + '\n\n' + link + '\n\n' + html_url + '\n\n' + body, + // labels: ['duty-machine'], + //}) } } catch (error) { core.setFailed(error.message);