2025-01-20 10:24:00 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
2025-11-01 08:40:20 +01:00
|
|
|
from fep_tools import get_fep_ids, FepFile
|
|
|
|
|
from fep_tools.issue import create_issue
|
2025-01-20 10:24:00 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
owner = os.environ.get("CI_REPO_OWNER")
|
|
|
|
|
repo = os.environ.get("CI_REPO_NAME")
|
|
|
|
|
token = os.environ.get("CODEBERG_API_TOKEN")
|
|
|
|
|
|
2025-11-01 08:40:20 +01:00
|
|
|
if not isinstance(owner, str):
|
|
|
|
|
print("Please set the owner of the repostory at CI_REPO_OWNER")
|
|
|
|
|
exit(1)
|
|
|
|
|
|
|
|
|
|
if not isinstance(repo, str):
|
|
|
|
|
print("Please set the repository at CI_REPO_NAME")
|
|
|
|
|
exit(1)
|
|
|
|
|
|
|
|
|
|
if not isinstance(token, str):
|
|
|
|
|
print("Please provide a codeberg api token")
|
|
|
|
|
exit(1)
|
|
|
|
|
|
|
|
|
|
|
2025-01-20 10:24:00 +00:00
|
|
|
for slug in get_fep_ids():
|
|
|
|
|
fep_file = FepFile(slug)
|
|
|
|
|
tracking_issue = fep_file.parsed_frontmatter.get("trackingIssue")
|
|
|
|
|
if not tracking_issue:
|
|
|
|
|
print(slug, tracking_issue)
|
|
|
|
|
|
2025-11-01 08:40:20 +01:00
|
|
|
create_issue(owner, repo, token, slug)
|