Issue importer: do not notify

This uses the forgejo patch we have for dont_notify on issue creation on
the api, and indeed does not notify, so we can simply run the script
safely :D

Fixes: https://git.lix.systems/lix-project/web-services/issues/38

Change-Id: I86bcbf9b4499b439b79b82af84ee7df0f8eb3298
This commit is contained in:
Jade Lovelace 2024-03-23 19:03:34 -07:00
parent 946fc12e4e
commit 33da9c09c8

View file

@ -117,6 +117,7 @@ def new_issue(title, body, labels):
'labels': labels, 'labels': labels,
'body': body, 'body': body,
'title': title, 'title': title,
'dont_notify': True,
}) })
already_imported = make_already_imported() already_imported = make_already_imported()
@ -139,11 +140,6 @@ def import_issue(iss: Issue):
new_issue(new_title, new_body, new_labels) new_issue(new_title, new_body, new_labels)
def go(): def go():
print('Have you turned off the forgejo mailer? Enter "We have" if so:')
answer = input('> ')
if answer != 'We have':
return
log.info('Importing issues!') log.info('Importing issues!')
for issue in issues_to_import(): for issue in issues_to_import():
import_issue(DataClassUnpack.instantiate(Issue, issue)) import_issue(DataClassUnpack.instantiate(Issue, issue))