-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (39 loc) · 3.04 KB
/
Makefile
File metadata and controls
52 lines (39 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: setup build clean test test-cov wiki-export wiki-update wiki-create jira-create jira-link-epic jira-get jira-my-tasks jira-transition
setup: ## Install dependencies and create venv
uv sync
build: ## Build standalone binary into dist/
uv run pyinstaller --onefile --name atlassian-local-cli main.py
clean: ## Remove build artifacts
rm -rf build dist *.spec htmlcov .coverage
test: ## Run tests
uv run pytest
test-cov: ## Run tests with coverage report
uv run pytest --cov=atlassian_local_cli --cov-report=term-missing --cov-report=html
wiki-export: ## Export a wiki page. Usage: make wiki-export PAGE=<page_id> [OUTPUT=<file.md>]
@if [ -z "$(PAGE)" ]; then echo "Error: PAGE is required."; exit 1; fi
uv run atlassian-local-cli wiki-export $(PAGE) $(if $(OUTPUT),-o $(OUTPUT))
wiki-update: ## Update a wiki page. Usage: make wiki-update PAGE=<page_id> INPUT=<file.md>
@if [ -z "$(PAGE)" ]; then echo "Error: PAGE is required."; exit 1; fi
@if [ -z "$(INPUT)" ]; then echo "Error: INPUT is required."; exit 1; fi
uv run atlassian-local-cli wiki-update $(PAGE) $(INPUT)
wiki-create: ## Create a wiki page. Usage: make wiki-create SPACE=<key> TITLE="<title>" INPUT=<file.md> [PARENT=<page_id>]
@if [ -z "$(SPACE)" ]; then echo "Error: SPACE is required."; exit 1; fi
@if [ -z "$(TITLE)" ]; then echo "Error: TITLE is required."; exit 1; fi
@if [ -z "$(INPUT)" ]; then echo "Error: INPUT is required."; exit 1; fi
uv run atlassian-local-cli wiki-create $(SPACE) "$(TITLE)" $(INPUT) $(if $(PARENT),--parent $(PARENT))
jira-create: ## Create a Jira issue. Usage: make jira-create PROJECT=<key> SUMMARY="<text>" [TYPE=Task] [PRIORITY=High] [ASSIGNEE=user] [DESCRIPTION="<text>"] [DESC_FILE=<file>]
@if [ -z "$(PROJECT)" ]; then echo "Error: PROJECT is required."; exit 1; fi
@if [ -z "$(SUMMARY)" ]; then echo "Error: SUMMARY is required."; exit 1; fi
uv run atlassian-local-cli jira-create --project $(PROJECT) --summary "$(SUMMARY)" $(if $(TYPE),--type $(TYPE)) $(if $(PRIORITY),--priority $(PRIORITY)) $(if $(ASSIGNEE),--assignee $(ASSIGNEE)) $(if $(DESCRIPTION),--description "$(DESCRIPTION)") $(if $(DESC_FILE),--description-file $(DESC_FILE))
jira-link-epic: ## Link issues to an Epic. Usage: make jira-link-epic ISSUES="PROJ-1 PROJ-2" EPIC=PROJ-100
@if [ -z "$(ISSUES)" ]; then echo "Error: ISSUES is required."; exit 1; fi
@if [ -z "$(EPIC)" ]; then echo "Error: EPIC is required."; exit 1; fi
uv run atlassian-local-cli jira-link-epic $(ISSUES) --epic $(EPIC)
jira-get: ## Get a Jira issue. Usage: make jira-get ISSUE=<key>
@if [ -z "$(ISSUE)" ]; then echo "Error: ISSUE is required."; exit 1; fi
uv run atlassian-local-cli jira-get $(ISSUE)
jira-my-tasks: ## List your Jira tasks. Usage: make jira-my-tasks [JSON=1] [LIMIT=50]
uv run atlassian-local-cli jira-my-tasks $(if $(JSON),--json) $(if $(LIMIT),--limit $(LIMIT))
jira-transition: ## Transition a Jira issue. Usage: make jira-transition ISSUE=<key> [STATUS="<status>"]
@if [ -z "$(ISSUE)" ]; then echo "Error: ISSUE is required."; exit 1; fi
uv run atlassian-local-cli jira-transition $(ISSUE) $(STATUS)