BlackRoad Tools - ERP, CRM, manifest profiler, and DevOps utilities: Core Tools: - manifest_profile.py (937 lines) - Kubernetes manifest analysis - pully.py (735 lines) - Pull request automation - build_cluster_manifests.py (515 lines) - K8s cluster builders - erp.py (478 lines) - Enterprise resource planning - crm.py (405 lines) - Customer relationship management - build_metaverse_roster.py (331 lines) - Agent roster management - storage.py (305 lines) - Storage abstractions - agent_test_pipeline.py (304 lines) - Test automation - holo_cli.py (259 lines) - Holographic display CLI DevOps Scripts: - orin_bootstrap.sh - Jetson Orin setup - install_self_heal_pack.sh - Self-healing infrastructure - deploy_openwebui.sh - OpenWebUI deployment - triton_setup.sh - NVIDIA Triton setup Subdirectories: - branch-cleanup/ - Git branch management - kpis/ - KPI dashboards - metrics/ - Metrics collection - miners/ - Data mining tools - pulse/ - Health monitoring - tools-adapter/ - Integration adapters 11,351 lines of Python across 116 code files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
61 lines
1.7 KiB
Python
61 lines
1.7 KiB
Python
"""Minimal Atlassian (JIRA) integration helpers."""
|
||
|
||
from __future__ import annotations
|
||
|
||
import base64
|
||
import os
|
||
from typing import Any, Dict
|
||
|
||
import requests
|
||
|
||
|
||
def _auth_header(email: str, token: str) -> str:
|
||
creds = f"{email}:{token}".encode("utf-8")
|
||
return base64.b64encode(creds).decode("utf-8")
|
||
|
||
|
||
def create_jira_issue(
|
||
summary: str,
|
||
description: str,
|
||
project_key: str,
|
||
*,
|
||
issue_type: str = "Task",
|
||
base_url: str | None = None,
|
||
email: str | None = None,
|
||
api_token: str | None = None,
|
||
) -> Dict[str, Any]:
|
||
"""Create an issue in Atlassian JIRA.
|
||
|
||
Configuration values are taken from the environment when not
|
||
explicitly provided:
|
||
|
||
``ATLASSIAN_BASE_URL`` – Base URL of the JIRA instance.
|
||
``ATLASSIAN_EMAIL`` – User email for authentication.
|
||
``ATLASSIAN_API_TOKEN`` – API token for the user.
|
||
"""
|
||
|
||
base_url = base_url or os.getenv("ATLASSIAN_BASE_URL")
|
||
email = email or os.getenv("ATLASSIAN_EMAIL")
|
||
api_token = api_token or os.getenv("ATLASSIAN_API_TOKEN")
|
||
if not base_url or not email or not api_token:
|
||
raise RuntimeError("Atlassian credentials are not fully configured")
|
||
|
||
url = f"{base_url.rstrip('/')}/rest/api/3/issue"
|
||
headers = {
|
||
"Authorization": f"Basic {_auth_header(email, api_token)}",
|
||
"Accept": "application/json",
|
||
"Content-Type": "application/json",
|
||
}
|
||
payload = {
|
||
"fields": {
|
||
"project": {"key": project_key},
|
||
"summary": summary,
|
||
"description": description,
|
||
"issuetype": {"name": issue_type},
|
||
}
|
||
}
|
||
resp = requests.post(url, headers=headers, json=payload, timeout=10)
|
||
resp.raise_for_status()
|
||
return resp.json()
|
||
|