Some checks are pending
CI/CD Pipeline / test (push) Waiting to run
- Simplified the FastAPI application structure and improved error handling with middleware. - Introduced a retry decorator for asynchronous functions to enhance reliability. - Modularized the LLM initialization and prompt loading into separate functions for better maintainability. - Updated Pydantic models for Jira webhook payload and analysis flags to ensure proper validation and structure. - Implemented a structured logging configuration for better traceability and debugging. - Added comprehensive unit tests for prompt loading, response validation, and webhook handling. - Established a CI/CD pipeline with GitHub Actions for automated testing and coverage reporting. - Enhanced the prompt template for LLM analysis to include specific instructions for handling escalations.
20 lines
481 B
Python
20 lines
481 B
Python
import pytest
|
|
from fastapi.testclient import TestClient
|
|
from jira_webhook_llm import app
|
|
|
|
@pytest.fixture
|
|
def test_client():
|
|
return TestClient(app)
|
|
|
|
@pytest.fixture
|
|
def mock_jira_payload():
|
|
return {
|
|
"issueKey": "TEST-123",
|
|
"summary": "Test Issue",
|
|
"description": "Test Description",
|
|
"comment": "Test Comment",
|
|
"labels": ["test"],
|
|
"status": "Open",
|
|
"assignee": "Tester",
|
|
"updated": "2025-07-13T12:00:00Z"
|
|
} |