Skip to content
Snippets Groups Projects
Commit 316a07b9 authored by Ciro Santilli's avatar Ciro Santilli
Browse files

disable comment and issue creation from actions

parent 523ccac4
No related branches found
No related tags found
No related merge requests found
......@@ -541,6 +541,7 @@ Not mentioned in other sections:
** on <<gov-takedowns-china>>: 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 <<falun-gong>> believer given the imagery on the index page.
* https://github.com/TaiduGousima/Fuck-cirosantilli
 
Interesting users:
 
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment