我在 github 上的项目中已经输入了数十个问题,这些问题在那里没有位置。一些爱因斯坦运行了一个脚本,并通过 api 创建了所有这些无意义的问题。没有任何东西与这些问题有关。
当然,我可以通过某种方式删除它们,但我似乎无法在文档中找到它。
我在 github 上的项目中已经输入了数十个问题,这些问题在那里没有位置。一些爱因斯坦运行了一个脚本,并通过 api 创建了所有这些无意义的问题。没有任何东西与这些问题有关。
当然,我可以通过某种方式删除它们,但我似乎无法在文档中找到它。
Due to legal problems I've had to delete several issues with many comments of a project. I did as follows:
Copy paste on browser address bar:
javascript:(function(){ $('.delete-button.octicon.octicon-x.js-comment-delete').each(function(){ href=$(this).attr("href"); if(href!==undefined) { console.log("DELETING: "+href); $.ajax({type:"DELETE",url:href}); } }); firstCommentToedit=$('form.js-comment-update')[0]; $.ajax({ type:"POST", url:firstCommentToedit.action, data:{ _method:$(firstCommentToedit).find('input[name=_method]').val(), "issue[body]":"THIS ISSUE WAS DELETED AND BLOCKED", authenticity_token:$(firstCommentToedit).find('input[name=authenticity_token]').val() } }); lockLink=$('a[href$="/lock"]')[0]; if (lockLink!==undefined) { $.ajax({ type:"POST", url:lockLink.href, data:{_method:$(lockLink).attr("data-method")} }); } setTimeout(function(){window.location=window.location;},3000) })()
Expanded:
javascript: (function() {
$('.delete-button.octicon.octicon-x.js-comment-delete').each(function() {
href = $(this).attr("href");
if (href !== undefined) {
console.log("DELETING: " + href);
$.ajax({
type: "DELETE",
url: href
});
}
});
firstCommentToedit = $('form.js-comment-update')[0];
$.ajax({
type: "POST",
url: firstCommentToedit.action,
data: {
_method: $(firstCommentToedit).find('input[name=_method]').val(),
"issue[body]": "THIS ISSUE WAS DELETED AND BLOCKED",
authenticity_token: $(firstCommentToedit).find('input[name=authenticity_token]').val()
}
});
lockLink = $('a[href$="/lock"]')[0];
if (lockLink !== undefined) {
$.ajax({
type: "POST",
url: lockLink.href,
data: {
_method: $(lockLink).attr("data-method")
}
});
}
setTimeout(function() {
window.location = window.location;
}, 3000)
})()