forked from Ogstevyn/payeasy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_issues.py
More file actions
39 lines (30 loc) · 1.23 KB
/
create_issues.py
File metadata and controls
39 lines (30 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import re
import subprocess
# Read the issues file
with open('issues.md', 'r', encoding='utf-8') as f:
content = f.read()
# Find all issues
pattern = r'### \[Issue #(\d+)\] (.+?)\n(\*\*Description\*\*.*?)(?=### \[Issue|\Z)'
matches = list(re.finditer(pattern, content, re.DOTALL))
print(f"Found {len(matches)} issues total")
for match in matches:
issue_num = int(match.group(1))
# Only process issues 22-40
if 22 <= issue_num <= 40:
title = match.group(2).strip()
full_issue_body = match.group(3).strip()
print(f'\nCreating Issue #{issue_num}: {title}')
# Create the issue with gh command
result = subprocess.run([
'gh', 'issue', 'create',
'--title', f'[Issue #{issue_num}] {title}',
'--body', full_issue_body,
'--repo', 'Ogstevyn/payeasy'
], capture_output=True, text=True)
if result.returncode == 0:
print(f'✓ Successfully created Issue #{issue_num}')
print(result.stdout.strip())
else:
print(f'✗ Failed to create Issue #{issue_num}')
print(result.stderr)
print("\nFinished creating issues #22-40")