feat: Add option to create draft issues from the new-issue script

This commit is contained in:
Prad Nukala 2024-12-23 13:35:52 -05:00
parent c9cc4042db
commit 9556faabb9
2 changed files with 16 additions and 3 deletions

View File

@ -56,8 +56,15 @@ preview_output | gum format
# Confirm to create a GitHub issue
if gum confirm "Do you want to create a new GitHub issue with this information?"; then
# Create a new GitHub issue using the gh CLI
# Ask if this should be a draft issue
if gum confirm "Create as draft issue?"; then
# Create a draft GitHub issue
gh issue create --repo onsonr/sonr --title "($SCOPE) $TITLE" --body "$ISSUE_BODY"
else
# Create a regular GitHub issue
gh issue create --repo onsonr/sonr --title "($SCOPE) $TITLE" --body "$ISSUE_BODY" -a @me
fi
else
exit 1
fi

View File

@ -51,6 +51,12 @@ tasks:
- for: { var: DEPS }
cmd: gum spin --spinner dot --title "Installing go dependencies..." -- go install {{.ITEM}}
new-issue:
desc: Create a new issue
silent: true
dir: .github/scripts
cmds:
- sh new_issue.sh
pkl-gen:
desc: Generate PKL files
silent: true