forked from Stellarkard/Stellar_Card
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_github_issues_resume.sh
More file actions
executable file
·51 lines (39 loc) · 1.25 KB
/
Copy pathcreate_github_issues_resume.sh
File metadata and controls
executable file
·51 lines (39 loc) · 1.25 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
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Ensure GitHub CLI is installed
if ! command -v gh &> /dev/null
then
echo "GitHub CLI (gh) could not be found. Please install it first."
exit 1
fi
# Ensure user is authenticated
if ! gh auth status &> /dev/null
then
echo "Please run 'gh auth login' before executing this script."
exit 1
fi
# Template file
TEMPLATE_FILE="issueTemplate.md"
if [ ! -f "$TEMPLATE_FILE" ]; then
echo "Template file $TEMPLATE_FILE not found."
exit 1
fi
# Folders to generate issues for
FOLDERS=("backend" "contract" "frontend" "sdk")
echo "Starting issue creation on GitHub..."
for folder in "${FOLDERS[@]}"; do
echo "Creating issues for folder: $folder"
START_IDX=1
# We already created 3 issues for 'backend' before cancelling, so we skip them
if [ "$folder" == "backend" ]; then
START_IDX=4
fi
for i in $(seq $START_IDX 50); do
TITLE="[$folder] Issue #$i"
# Adding a short delay to avoid hitting rate limits
echo "Creating: $TITLE"
gh issue create --title "$TITLE" --body-file "$TEMPLATE_FILE"
# Optional: wait 2 seconds between requests to prevent API rate limiting
sleep 2
done
done
echo "All remaining issues have been successfully created!"