diff --git a/Makefile b/Makefile index 9669c13e..c18b036b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # MarkiTect - Advanced Markdown Engine # Makefile for common development tasks -.PHONY: help setup install test build clean update status dev lint format check-deps venv-status update-digest add-diary-entry +.PHONY: help setup install test build clean update status dev lint format check-deps venv-status update-digest add-diary-entry list-issues show-issue list-open-issues # Default target help: @@ -32,6 +32,11 @@ help: @echo "Documentation:" @echo " update-digest - Update ProjectStatusDigest.md (requires Claude Code)" @echo " add-diary-entry - Add new entry to ProjectDiary.md (requires Claude Code)" + @echo "" + @echo "Issue Management:" + @echo " list-issues - Show all gitea issues with status and priority" + @echo " list-open-issues - Show only open issues (active backlog)" + @echo " show-issue NUM=X - Show detailed view of specific issue" # Python and virtual environment setup PYTHON := python3 @@ -203,3 +208,68 @@ add-diary-entry: @echo " - One paragraph work summary" @echo "" @echo "💡 Tip: New entries are added to the top for reverse chronological order" + +# Git repository and API configuration +GITEA_URL := http://92.205.130.254:32166 +REPO_OWNER := coulomb +REPO_NAME := markitect_project +ISSUES_API := $(GITEA_URL)/api/v1/repos/$(REPO_OWNER)/$(REPO_NAME)/issues + +# List all gitea issues +list-issues: + @echo "📋 MarkiTect Issues from Gitea Repository" + @echo "========================================" + @echo "" + @if ! command -v curl >/dev/null 2>&1; then \ + echo "❌ curl not found - required for API access"; \ + exit 1; \ + fi + @if ! command -v jq >/dev/null 2>&1; then \ + echo "⚠️ jq not found - using basic formatting"; \ + echo " Install jq for better formatting: sudo apt install jq"; \ + curl -s "$(ISSUES_API)" | head -20; \ + else \ + curl -s "$(ISSUES_API)" | jq -r '.[] | "[\(.state | ascii_upcase)] #\(.number): \(.title)\n Created: \(.created_at[:10]) | Updated: \(.updated_at[:10])\n \(.body[:80])...\n"' | head -40; \ + fi + @echo "" + @echo "💡 Tip: Use 'make show-issue NUM=X' to see full details" + +# Show detailed view of a specific issue +show-issue: + @if [ -z "$(NUM)" ]; then \ + echo "❌ Please specify issue number: make show-issue NUM=5"; \ + exit 1; \ + fi + @if ! command -v curl >/dev/null 2>&1; then \ + echo "❌ curl not found - required for API access"; \ + exit 1; \ + fi + @echo "🔍 Issue #$(NUM) Details" + @echo "=======================" + @echo "" + @if ! command -v jq >/dev/null 2>&1; then \ + echo "⚠️ jq not found - using basic formatting"; \ + curl -s "$(ISSUES_API)/$(NUM)"; \ + else \ + curl -s "$(ISSUES_API)/$(NUM)" | jq -r 'if . == null or .message then "❌ Issue #$(NUM) not found or API error" else "**Title:** " + .title + "\n**Status:** " + (.state | ascii_upcase) + "\n**Number:** #" + (.number | tostring) + "\n**Created:** " + (.created_at[:10]) + " by " + (.user.full_name // .user.login) + "\n**Updated:** " + (.updated_at[:10]) + "\n**URL:** " + .html_url + "\n\n**Description:**\n" + .body end' 2>/dev/null || echo "❌ Issue #$(NUM) not found or API error"; \ + fi + @echo "" + @echo "💡 Tip: Use 'make list-issues' to see all issues" + +# List only open issues (active backlog) +list-open-issues: + @echo "📋 Open MarkiTect Issues (Active Backlog)" + @echo "========================================" + @echo "" + @if ! command -v curl >/dev/null 2>&1; then \ + echo "❌ curl not found - required for API access"; \ + exit 1; \ + fi + @if ! command -v jq >/dev/null 2>&1; then \ + echo "⚠️ jq not found - using basic formatting"; \ + curl -s "$(ISSUES_API)?state=open" | head -20; \ + else \ + curl -s "$(ISSUES_API)?state=open" | jq -r '.[] | "[OPEN] #\(.number): \(.title)\n Created: \(.created_at[:10]) | Updated: \(.updated_at[:10])\n \(.body[:80])...\n"' | head -40; \ + fi + @echo "" + @echo "💡 Tip: Use 'make show-issue NUM=X' for full details or 'make list-issues' for all issues"