# rohitnb/jira-issue-checks-action architecture

> Architecture diagram of the GitHub repository rohitnb/jira-issue-checks-action, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohitnb/jira-issue-checks-action
- Repository: https://github.com/rohitnb/jira-issue-checks-action

## Overview

##### Main Components

a) External Systems:
- GitHub (Action Runtime Environment)
- JIRA (Atlassian Cloud)

b) Internal Components:
- Action Input Handler
- JIRA API Client
- Check Processor
- Result Generator

**[GitHub Actions Runtime] → [JIRA Issue Checks Action] → [JIRA Cloud API]**

**[Input Handler] → [JIRA API Client] → [Check Processor] → [Result Generator]**

##### Specific Elements

a) Input Flow:
- Four required inputs (jira-issue, jira-token, ghtoken, jira-domain)

b) Processing Flow:
- Five main checks:
- Assignment check
- Status check
- Sprint check
- Fix Version check
- Time logging check

c) Output Flow:
- Five output parameters
- Final result compilation

##### Specific Implementation Details

**[External Systems]**
- GitHub Actions Runtime
- JIRA Cloud

**[Action Components]**
- Input Handler (src/jira-assign-check.js)
- JIRA API Client
- Check Processor
- Result Generator

**[Data Flow]**
- Inputs → Validation → API Calls
- Results Processing → Output Generation

##### Additional Recommendations

- Error handling paths
- Authentication flow with JIRA
- Asynchronous operations
- Security-sensitive components (token handling)

##### Technical Details to Highlight

- Node.js runtime environment
- REST API interactions
- GitHub Actions context
- JIRA API integration points

This system design should help developers understand both the high-level architecture and the specific implementation details of the JIRA Issue Checks Action.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph External
        GH[GitHub Actions Runtime]
        JIRA[JIRA Cloud API]
    end

    subgraph "Action Flow"
        Input[Action Input Handler]
        APIClient[JIRA API Client]
        Processor[Check Processor]
        Generator[Result Generator]
        Dist[Main Distribution]
        Config[Action Configuration]
        Deps[Package Dependencies]
    end

    subgraph "Checks"
        C1[Assignment Check]
        C2[Status Check]
        C3[Sprint Check]
        C4[Fix Version Check]
        C5[Time Logging Check]
    end

    subgraph "Inputs"
        I1["jira-issue"]
        I2["jira-token"]
        I3["ghtoken"]
        I4["jira-domain"]
    end

    subgraph "Outputs"
        O1[Assignment Result]
        O2[Status Result]
        O3[Sprint Result]
        O4[Fix Version Result]
        O5[Time Logging Result]
    end

    GH --> Input
    Input --> APIClient
    APIClient --> JIRA
    JIRA --> APIClient
    APIClient --> Processor
    Processor --> Generator
    
    I1 --> Input
    I2 --> Input
    I3 --> Input
    I4 --> Input

    Processor --> C1
    Processor --> C2
    Processor --> C3
    Processor --> C4
    Processor --> C5

    C1 --> O1
    C2 --> O2
    C3 --> O3
    C4 --> O4
    C5 --> O5

    classDef external fill:#3498db,stroke:#2980b9,color:white
    classDef input fill:#2ecc71,stroke:#27ae60,color:white
    classDef process fill:#f1c40f,stroke:#f39c12,color:black
    classDef output fill:#e67e22,stroke:#d35400,color:white
    classDef core fill:#95a5a6,stroke:#7f8c8d,color:white

    class GH,JIRA external
    class Input,I1,I2,I3,I4 input
    class APIClient,Processor,C1,C2,C3,C4,C5 process
    class O1,O2,O3,O4,O5,Generator output
    class Dist,Config,Deps core

    click Input "https://github.com/rohitnb/jira-issue-checks-action/blob/main/action.yml"
    click APIClient "https://github.com/rohitnb/jira-issue-checks-action/blob/main/src/jira-assign-check.js"
    click Processor "https://github.com/rohitnb/jira-issue-checks-action/blob/main/src/jira-assign-check.js"
    click Generator "https://github.com/rohitnb/jira-issue-checks-action/blob/main/src/jira-assign-check.js"
    click Dist "https://github.com/rohitnb/jira-issue-checks-action/blob/main/dist/index.js"
    click Deps "https://github.com/rohitnb/jira-issue-checks-action/blob/main/package.json"
    click Config "https://github.com/rohitnb/jira-issue-checks-action/blob/main/action.yml"
```
