mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
- **feat: add documentation and GitHub Actions workflow for publishing documentation** - **docs(concepts): add documentation for chain modules** - **refactor: Simplify session management with SQLite storage and remove deprecated code** - **refactor: Simplify database initialization and remove DatabaseContext** - **refactor: move connection handling logic to resolver package** - **feat: implement session management with database persistence** - **feat: Ensure config directory exists when creating database path** - **feat: Add SetUserHandle function to set user handle in session** - **feat: Add public methods to set session fields with database save** - **refactor: Remove unused session setter functions** - **feat: Add getter methods for all Session Model properties** - **feat: enhance Session model with user name details** - **feat: add Motr support and update UI elements** - **<no value>** - **feat: Add unique handle constraint and method to check handle existence** - **docs: update site URL to onsonr.dev** - **fix: correct import statement for database package** - **test: updated CI to run tests on pull requests and merge groups** - **docs: remove reference to develop branch in workflow** - **feat: add WebAuthn support for user registration** - **fix: correct smart account attenuation preset name** - **feat: add ComputeIssuerDID and ComputeSonrAddr functions to ucan package** - **test: add unit tests for MPC keyset and keyshare** - **feat: introduce new script to streamline GitHub issue creation**
64 lines
1.6 KiB
Bash
Executable File
64 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
ROOT_DIR=$(git rev-parse --show-toplevel)
|
|
|
|
# Extract scope name and path using jq, and pass it to fzf for selection
|
|
SCOPE=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r '.[] | "\(.name)"' | fzf --prompt "Select scope:")
|
|
DOCS=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r ".[] | select(.name == \"$SCOPE\") | .docs[]")
|
|
|
|
# Write Title
|
|
TITLE=$(gum input --placeholder "Issue Title...")
|
|
|
|
# Write Goal
|
|
GOAL=$(mods --role "determine-issue-goal" "$SCOPE $TITLE")
|
|
|
|
# Input Requirements
|
|
REQUIREMENTS=()
|
|
while true; do
|
|
if [ ${#REQUIREMENTS[@]} -ge 2 ]; then
|
|
if ! gum confirm "Do you want to add another requirement?"; then
|
|
break
|
|
fi
|
|
fi
|
|
REQUIREMENT=$(gum input --placeholder "Add a requirement...")
|
|
if [ -n "$REQUIREMENT" ]; then
|
|
REQUIREMENTS+=("$REQUIREMENT")
|
|
else
|
|
echo "Requirement cannot be empty. Please enter a valid requirement."
|
|
fi
|
|
done
|
|
|
|
create_body() {
|
|
echo "### Goal(s):"
|
|
echo "$GOAL"
|
|
echo "### Requirements:"
|
|
for i in "${!REQUIREMENTS[@]}"; do
|
|
echo "$(($i + 1)). ${REQUIREMENTS[$i]}"
|
|
done
|
|
echo "### Resources:"
|
|
for doc in "${DOCS[@]}"; do
|
|
echo "- $doc"
|
|
done
|
|
}
|
|
|
|
ISSUE_BODY=$(create_body)
|
|
|
|
# Function to collect output
|
|
preview_output() {
|
|
echo "# ($SCOPE) $TITLE"
|
|
echo "$ISSUE_BODY"
|
|
}
|
|
|
|
# Display the formatted output
|
|
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
|
|
gh issue create --repo onsonr/sonr --title "($SCOPE) $TITLE" --body "$ISSUE_BODY"
|
|
else
|
|
exit 1
|
|
fi
|