diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/bugs | 4 | ||||
| -rwxr-xr-x | scripts/resolve-bug | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/scripts/bugs b/scripts/bugs new file mode 100755 index 0000000..4f3c064 --- /dev/null +++ b/scripts/bugs @@ -0,0 +1,4 @@ +#!/bin/bash +# List all bugs from the production database + +ssh titanium "sqlite3 -column -header /site/doot.terst.org/data/dashboard.db 'SELECT id, description, created_at FROM bugs ORDER BY id'" diff --git a/scripts/resolve-bug b/scripts/resolve-bug new file mode 100755 index 0000000..a3f0979 --- /dev/null +++ b/scripts/resolve-bug @@ -0,0 +1,23 @@ +#!/bin/bash +# Resolve (delete) a bug by ID + +if [ -z "$1" ]; then + echo "Usage: resolve-bug <bug_id>" + exit 1 +fi + +BUG_ID="$1" + +# Show the bug being resolved +echo "Resolving bug #$BUG_ID:" +ssh titanium "sqlite3 -column /site/doot.terst.org/data/dashboard.db \"SELECT description FROM bugs WHERE id = $BUG_ID\"" + +# Delete the bug +ssh titanium "sqlite3 /site/doot.terst.org/data/dashboard.db \"DELETE FROM bugs WHERE id = $BUG_ID\"" + +if [ $? -eq 0 ]; then + echo "Bug #$BUG_ID resolved." +else + echo "Failed to resolve bug #$BUG_ID" + exit 1 +fi |
