feat(workflow): Multiple fixes in one (#160)

* fix(workflow): Re-organized the workflow, put the scripts in their own scripts folder

* fix(workflow): Fixed so that we have a default SELECT selection in the issue templates

* fix(workflow): Added a way to run the issue workflows manually as well

* feat(workflow): Added workflow for closing issues with no selected plugin

* fix(workflow): Changed so that we only use one file for jobs that only care about the plugin folders

* fix(workflows): resolve repository root after script move

---------

Co-authored-by: Lemmy <studio@quadbyte.net>
This commit is contained in:
Spyridon Siarapis
2026-07-30 09:17:54 -04:00
committed by GitHub
co-authored by Lemmy
parent 68d904fcea
commit 9b2179899b
15 changed files with 144 additions and 67 deletions
@@ -0,0 +1,40 @@
import os
import sys
from github import Auth, Github
token = os.environ["GITHUB_TOKEN"]
repo_name = os.environ["REPOSITORY"]
issue_number = os.environ["ISSUE_NUMBER"]
auth = Auth.Token(token)
gh = Github(auth=auth)
repo = gh.get_repo(repo_name)
if issue_number.isdigit():
issue_number = int(issue_number)
else:
print("Issue number is not numeric!")
sys.exit(1)
issue = repo.get_issue(issue_number)
body = issue.body
lines = body.splitlines()
try:
title_index = lines.index("### Plugin")
except ValueError:
print("No Plugin title found!")
sys.exit(0)
for i in range(title_index + 1, len(lines)):
if lines[i]:
break
plugin = lines[i].strip()
if "--- SELECT ---" in plugin:
issue.create_comment("Specify which plugin this issue is about!")
issue.edit(state='closed', state_reason='null')