Skip to content

feat: add Jira issue fetcher component and pipeline #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mathislucka
Copy link
Member

Overview

This PR adds support for fetching issues from Jira to complement the existing GitHub issue fetcher functionality. It creates a similar Haystack component structure that integrates with Jira's REST API to fetch issue data and convert it to chat messages for the agent.

Features Added

  1. JiraIssueViewer Component: Fetches Jira issues and comments, handling Jira's Atlassian Document Format (ADF) content structure
  2. FetchJiraIssue SuperComponent: Combines issue fetching, document conversion, and branch creation like the GitHub counterpart
  3. Jira Agent Pipeline: Parallels the GitHub agent pipeline but uses the Jira components

Implementation Details

Jira API Integration

  • Implemented authentication using Jira API token and email
  • Added support for parsing Jira Cloud URLs (e.g., https://your-domain.atlassian.net/browse/PROJECT-123)
  • Created helper methods to extract readable text from Jira's complex document format (ADF)

Component Structure

  • Created components with the same interfaces as their GitHub counterparts for consistency
  • Maintained the same document/message conversion process for seamless integration

Pipeline Configuration

  • Added a Jira agent pipeline that mirrors the GitHub agent pipeline
  • Updated pipelines package exports to include both agent types
  • Reused the system prompt from the GitHub agent since the agent behavior is identical

Tests

  • Added comprehensive unit tests for the new components
  • Included mocking of Jira API responses for testing

Testing Considerations

The implementation has been tested with unit tests that verify:

  • Correct parsing of Jira URLs
  • Proper extraction of text from Jira's document format
  • Error handling for API issues
  • Component integration and serialization

Manual testing should verify:

  1. Authentication with real Jira credentials
  2. Fetching real issues from Jira instances
  3. End-to-end pipeline execution

Environment Requirements

To use this feature, users will need to set the following environment variables:

  • JIRA_API_TOKEN: A valid Jira API token
  • JIRA_EMAIL: The email associated with the Jira account

Closes #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: create an Agent that is exactly the same as the github_agent but it should fetch issues from the Jira API
1 participant