feat: optimize make targets for issue management - Issue #137
Standardize all issue management make targets to use consistent "issue-" prefix: - list-issues → issue-list - show-issue → issue-show - list-open-issues → issue-list-open - create-issue → issue-create - close-issue → issue-close - close-issue-enhanced → issue-close-enhanced - close-issues-batch → issue-close-batch - issues-get → issue-get - issues-csv → issue-csv - issues-json → issue-json - issues-high → issue-high Updated .PHONY declarations, help text, and error messages. Updated TestCLIConsolidation::test_make_targets_work to validate new conventions. All issue management targets now follow consistent naming pattern. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
58
Makefile
58
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 list-issues show-issue list-open-issues create-issue close-issue close-issue-enhanced close-issues-batch test-from-issue tdd-start tdd-add-test tdd-finish tdd-status test-status test-new test-coverage test-arch test-foundation test-infrastructure test-integration test-domain test-service test-application test-presentation test-quick test-layers test-random test-random-seed test-random-repeat test-install-randomly test-clean test-tdd test-changed test-module test-cache-clean test-efficient cli-help release-status release-validate release-prepare release-build release-publish release-dry-run chaos-validate chaos-matrix chaos-inject chaos-report
|
||||
.PHONY: help setup install test build clean update status dev lint format check-deps venv-status update-digest add-diary-entry issue-list issue-show issue-list-open issue-create issue-close issue-close-enhanced issue-close-batch issue-get issue-csv issue-json issue-high test-from-issue tdd-start tdd-add-test tdd-finish tdd-status test-status test-new test-coverage test-arch test-foundation test-infrastructure test-integration test-domain test-service test-application test-presentation test-quick test-layers test-random test-random-seed test-random-repeat test-install-randomly test-clean test-tdd test-changed test-module test-cache-clean test-efficient cli-help release-status release-validate release-prepare release-build release-publish release-dry-run chaos-validate chaos-matrix chaos-inject chaos-report
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@@ -77,17 +77,17 @@ help:
|
||||
@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 " create-issue TITLE='...' BODY='...' - Create a new issue (or BODY_FILE='/path/to/file.md')"
|
||||
@echo " show-issue ISSUE=X (or NUM=X) - Show detailed view of specific issue"
|
||||
@echo " close-issue ISSUE=X [COMMENT='reason'] - Close an issue and mark as completed"
|
||||
@echo " close-issue-enhanced ISSUE=X [WORK='description'] - Close issue with enhanced functionality"
|
||||
@echo " close-issues-batch NUMS='X Y Z' [COMMENT='reason'] - Close multiple issues at once"
|
||||
@echo " issues-get - Export compact issue index to ISSUES.index"
|
||||
@echo " issues-csv - Export issues as CSV for spreadsheet processing"
|
||||
@echo " issues-json - Export issues as JSON for programmatic processing"
|
||||
@echo " issues-high - Export only high/critical priority issues"
|
||||
@echo " issue-list - Show all gitea issues with status and priority"
|
||||
@echo " issue-list-open - Show only open issues (active backlog)"
|
||||
@echo " issue-create TITLE='...' BODY='...' - Create a new issue (or BODY_FILE='/path/to/file.md')"
|
||||
@echo " issue-show ISSUE=X (or NUM=X) - Show detailed view of specific issue"
|
||||
@echo " issue-close ISSUE=X [COMMENT='reason'] - Close an issue and mark as completed"
|
||||
@echo " issue-close-enhanced ISSUE=X [WORK='description'] - Close issue with enhanced functionality"
|
||||
@echo " issue-close-batch NUMS='X Y Z' [COMMENT='reason'] - Close multiple issues at once"
|
||||
@echo " issue-get - Export compact issue index to ISSUES.index"
|
||||
@echo " issue-csv - Export issues as CSV for spreadsheet processing"
|
||||
@echo " issue-json - Export issues as JSON for programmatic processing"
|
||||
@echo " issue-high - Export only high/critical priority issues"
|
||||
@echo ""
|
||||
@echo "Test-Driven Development:"
|
||||
@echo " test-from-issue ISSUE=X - Generate test skeleton from issue (requires Claude Code)"
|
||||
@@ -397,11 +397,11 @@ WORKSPACE_DIR := .markitect_workspace
|
||||
CURRENT_ISSUE_FILE := $(WORKSPACE_DIR)/current_issue.json
|
||||
|
||||
# List all gitea issues
|
||||
list-issues: $(VENV)/bin/activate
|
||||
issue-list: $(VENV)/bin/activate
|
||||
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py list-issues
|
||||
|
||||
# Show detailed view of a specific issue
|
||||
show-issue: $(VENV)/bin/activate
|
||||
issue-show: $(VENV)/bin/activate
|
||||
@ISSUE_NUM=""; \
|
||||
if [ -n "$(ISSUE)" ]; then \
|
||||
ISSUE_NUM="$(ISSUE)"; \
|
||||
@@ -409,20 +409,20 @@ show-issue: $(VENV)/bin/activate
|
||||
ISSUE_NUM="$(NUM)"; \
|
||||
fi; \
|
||||
if [ -z "$$ISSUE_NUM" ]; then \
|
||||
echo "❌ Please specify issue number: make show-issue ISSUE=5 (or NUM=5)"; \
|
||||
echo "❌ Please specify issue number: make issue-show ISSUE=5 (or NUM=5)"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py show-issue $$ISSUE_NUM
|
||||
|
||||
# List only open issues (active backlog)
|
||||
list-open-issues: $(VENV)/bin/activate
|
||||
issue-list-open: $(VENV)/bin/activate
|
||||
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py list-open-issues
|
||||
|
||||
# Create a new issue
|
||||
create-issue:
|
||||
issue-create:
|
||||
@if [ -z "$(TITLE)" ]; then \
|
||||
echo "❌ Please specify issue title: make create-issue TITLE='Fix bug' BODY='Description'"; \
|
||||
echo "❌ Or use: make create-issue TITLE='Fix bug' BODY_FILE='/path/to/body.md'"; \
|
||||
echo "❌ Please specify issue title: make issue-create TITLE='Fix bug' BODY='Description'"; \
|
||||
echo "❌ Or use: make issue-create TITLE='Fix bug' BODY_FILE='/path/to/body.md'"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ -z "$(BODY)" ] && [ -z "$(BODY_FILE)" ]; then \
|
||||
@@ -438,7 +438,7 @@ create-issue:
|
||||
fi
|
||||
|
||||
# Close an issue and mark as completed
|
||||
close-issue: $(VENV)/bin/activate
|
||||
issue-close: $(VENV)/bin/activate
|
||||
@ISSUE_NUM=""; \
|
||||
if [ -n "$(ISSUE)" ]; then \
|
||||
ISSUE_NUM="$(ISSUE)"; \
|
||||
@@ -446,7 +446,7 @@ close-issue: $(VENV)/bin/activate
|
||||
ISSUE_NUM="$(NUM)"; \
|
||||
fi; \
|
||||
if [ -z "$$ISSUE_NUM" ]; then \
|
||||
echo "❌ Please specify issue number: make close-issue ISSUE=5 (or NUM=5)"; \
|
||||
echo "❌ Please specify issue number: make issue-close ISSUE=5 (or NUM=5)"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -n "$(COMMENT)" ]; then \
|
||||
@@ -459,7 +459,7 @@ close-issue: $(VENV)/bin/activate
|
||||
echo "✅ Issue #$$ISSUE_NUM closed successfully!"
|
||||
|
||||
# Close issue using dedicated issue_closer.py script (enhanced functionality)
|
||||
close-issue-enhanced: $(VENV)/bin/activate
|
||||
issue-close-enhanced: $(VENV)/bin/activate
|
||||
@ISSUE_NUM=""; \
|
||||
if [ -n "$(ISSUE)" ]; then \
|
||||
ISSUE_NUM="$(ISSUE)"; \
|
||||
@@ -467,7 +467,7 @@ close-issue-enhanced: $(VENV)/bin/activate
|
||||
ISSUE_NUM="$(NUM)"; \
|
||||
fi; \
|
||||
if [ -z "$$ISSUE_NUM" ]; then \
|
||||
echo "❌ Please specify issue number: make close-issue-enhanced ISSUE=5 (or NUM=5)"; \
|
||||
echo "❌ Please specify issue number: make issue-close-enhanced ISSUE=5 (or NUM=5)"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -n "$(WORK)" ]; then \
|
||||
@@ -482,9 +482,9 @@ close-issue-enhanced: $(VENV)/bin/activate
|
||||
fi
|
||||
|
||||
# Close multiple issues at once using issue_closer.py
|
||||
close-issues-batch: $(VENV)/bin/activate
|
||||
issue-close-batch: $(VENV)/bin/activate
|
||||
@if [ -z "$(NUMS)" ]; then \
|
||||
echo "❌ Please specify issue numbers: make close-issues-batch NUMS='42 43 44'"; \
|
||||
echo "❌ Please specify issue numbers: make issue-close-batch NUMS='42 43 44'"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ -n "$(COMMENT)" ]; then \
|
||||
@@ -496,7 +496,7 @@ close-issues-batch: $(VENV)/bin/activate
|
||||
fi
|
||||
|
||||
# Export compact issue index to ISSUES.index file (TSV format)
|
||||
issues-get: $(VENV)/bin/activate
|
||||
issue-get: $(VENV)/bin/activate
|
||||
@echo "📋 Fetching issue index from gitea..."
|
||||
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py issue-index --format tsv --sort number > ISSUES.index
|
||||
@echo "✅ Issue index exported to ISSUES.index (TSV format)"
|
||||
@@ -504,14 +504,14 @@ issues-get: $(VENV)/bin/activate
|
||||
@cat ISSUES.index
|
||||
|
||||
# Export issues as CSV for spreadsheet processing
|
||||
issues-csv: $(VENV)/bin/activate
|
||||
issue-csv: $(VENV)/bin/activate
|
||||
@echo "📊 Exporting issues as CSV..."
|
||||
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py issue-index --format csv --sort priority --include-state > ISSUES.csv
|
||||
@echo "✅ Issues exported to ISSUES.csv"
|
||||
@wc -l ISSUES.csv | awk '{print "📄 Total entries:", $$1-1, "(excluding header)"}'
|
||||
|
||||
# Export issues as JSON for programmatic processing
|
||||
issues-json: $(VENV)/bin/activate
|
||||
issue-json: $(VENV)/bin/activate
|
||||
@echo "🔧 Exporting issues as JSON..."
|
||||
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py issue-index --format json --sort priority > ISSUES.json
|
||||
@echo "✅ Issues exported to ISSUES.json"
|
||||
@@ -519,7 +519,7 @@ issues-json: $(VENV)/bin/activate
|
||||
@head -20 ISSUES.json
|
||||
|
||||
# Export only high and critical priority issues
|
||||
issues-high: $(VENV)/bin/activate
|
||||
issue-high: $(VENV)/bin/activate
|
||||
@echo "🚨 Exporting high priority issues..."
|
||||
@echo "High priority issues:" > ISSUES.high.txt
|
||||
@PYTHONPATH=. $(VENV_PYTHON) tddai_cli.py issue-index --format tsv --filter-priority high --sort number >> ISSUES.high.txt
|
||||
|
||||
@@ -170,10 +170,10 @@ class TestCLIConsolidation:
|
||||
if makefile_path.exists():
|
||||
makefile_content = makefile_path.read_text()
|
||||
|
||||
# Check for issue-related targets
|
||||
# Check for issue-related targets (using new issue- prefix convention)
|
||||
expected_targets = [
|
||||
"close-issue", "close-issue-enhanced", "close-issues-batch",
|
||||
"list-issues", "show-issue"
|
||||
"issue-close", "issue-close-enhanced", "issue-close-batch",
|
||||
"issue-list", "issue-show"
|
||||
]
|
||||
|
||||
for target in expected_targets:
|
||||
|
||||
Reference in New Issue
Block a user