disable comment and issue creation from actions
This commit is contained in:
@@ -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
|
** 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/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/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:
|
Interesting users:
|
||||||
|
|
||||||
|
|||||||
41
action.js
41
action.js
@@ -165,22 +165,24 @@ if (!isComment) {
|
|||||||
// Make the request.
|
// Make the request.
|
||||||
try {
|
try {
|
||||||
const octokit = new github.getOctokit(process.env.GITHUB_TOKEN);
|
const octokit = new github.getOctokit(process.env.GITHUB_TOKEN);
|
||||||
const new_comment = octokit.issues.createComment({
|
// https://github.com/cirosantilli/china-dictatorship/issues/1330
|
||||||
owner: payload.repository.owner.login,
|
//const new_comment = octokit.issues.createComment({
|
||||||
repo: payload.repository.name,
|
// owner: payload.repository.owner.login,
|
||||||
issue_number: payload.issue.number,
|
// repo: payload.repository.name,
|
||||||
body: replyBody,
|
// issue_number: payload.issue.number,
|
||||||
});
|
// body: replyBody,
|
||||||
|
//});
|
||||||
let html_url
|
let html_url
|
||||||
if (isComment) {
|
if (isComment) {
|
||||||
const title = (`@${author}: ` + noQuoteArray.join('\n').replaceAll('\n', ' ')).substring(0, 255)
|
const title = (`@${author}: ` + noQuoteArray.join('\n').replaceAll('\n', ' ')).substring(0, 255)
|
||||||
html_url = payload.comment.html_url
|
html_url = payload.comment.html_url
|
||||||
const new_issue = octokit.issues.create({
|
// https://github.com/cirosantilli/china-dictatorship/issues/1330
|
||||||
owner: payload.repository.owner.login,
|
//const new_issue = octokit.issues.create({
|
||||||
repo: payload.repository.name,
|
// owner: payload.repository.owner.login,
|
||||||
title,
|
// repo: payload.repository.name,
|
||||||
body: html_url + '\n\n' + replyBody,
|
// title,
|
||||||
})
|
// body: html_url + '\n\n' + replyBody,
|
||||||
|
//})
|
||||||
} else {
|
} else {
|
||||||
// Update labels.
|
// Update labels.
|
||||||
await octokit.issues.update({
|
await octokit.issues.update({
|
||||||
@@ -224,13 +226,14 @@ try {
|
|||||||
const title = match[1]
|
const title = match[1]
|
||||||
const link = match[2]
|
const link = match[2]
|
||||||
const body = lines[4]
|
const body = lines[4]
|
||||||
const new_issue_duty = await octokit.issues.create({
|
// https://github.com/cirosantilli/china-dictatorship/issues/1330
|
||||||
owner: payload.repository.owner.login,
|
//const new_issue_duty = await octokit.issues.create({
|
||||||
repo: payload.repository.name,
|
// owner: payload.repository.owner.login,
|
||||||
title: title + ' ' + link,
|
// repo: payload.repository.name,
|
||||||
body: content.data.html_url + '\n\n' + link + '\n\n' + html_url + '\n\n' + body,
|
// title: title + ' ' + link,
|
||||||
labels: ['duty-machine'],
|
// body: content.data.html_url + '\n\n' + link + '\n\n' + html_url + '\n\n' + body,
|
||||||
})
|
// labels: ['duty-machine'],
|
||||||
|
//})
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user