[O] Filter states better
This commit is contained in:
parent
d017b6066c
commit
4fe39b405b
1 changed files with 2 additions and 5 deletions
|
@ -9,14 +9,11 @@ if __name__ == '__main__':
|
|||
repo = gh.get_repo("hykilpikonna/hyfetch")
|
||||
|
||||
while True:
|
||||
iss = repo.get_issues()
|
||||
iss = repo.get_issues(state='open')
|
||||
|
||||
for i in iss:
|
||||
if i.state == 'closed':
|
||||
continue
|
||||
|
||||
if i.user.login in ['Symbolic11']:
|
||||
i.edit(body="[Redacted by Content Moderation Bot]", state="closed")
|
||||
i.edit(title="[Redacted]", body="[Redacted by Content Moderation Bot]", state="closed")
|
||||
i.create_comment("Issue closed by bot for offensive content.")
|
||||
|
||||
print(f"Closed {i.number}")
|
||||
|
|
Loading…
Reference in a new issue