Aufgrund von rechtlichen Problemen musste ich mehrere Probleme mit vielen Kommentaren eines Projekts löschen. Ich tat, wie folgt:
- alle Kommentare löschen
- den Text der Ausgabe bearbeiten ("Diese Frage wurde GESTRICHEN UND GESPERRT")
- Blockierung der Ausgabe
Copy Paste in der Adresszeile des Browsers:
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) })()
Erweitert:
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)
})()
Gibt es Gründe, die Sie gerade nicht zu schließen, sie wollen? – Cairnarvon
Ich vermute, er will sie entfernen, damit er sie wieder eingeben kann, damit sie verknüpft sind. Und soweit ich das beurteilen kann, ist alles, was Sie tun können, das Schließen der Probleme. Ich kann keine Möglichkeit finden, sie tatsächlich zu entfernen. –
Ich könnte das tun, aber dann würde ich sagen, ich habe 200 geschlossene Probleme, wenn es wirklich nur 100 gibt und es sieht aus wie ein Desaster mit allen unsinnigen Titeln ... –