Skip to main content
Glama
extractAllText.ts1.25 kB
/** * Text Content Extractor * * This utility consolidates all textual content from a Jira issue into a single string. * It extracts and combines text from the issue summary, description, and all comments, * handling different text formats and structures. The consolidated text provides a * comprehensive corpus for content analysis, keyword detection, and semantic evaluation. * This extraction is fundamental for various metadata assessments that need to analyze * the full context of an issue's documentation. */ import { extractTextFromComment } from './extractTextFromComment' import { extractTextFromDescription } from './extractTextFromDescription' import type { IssueCommentResponse } from '../../../types/comment' import type { JiraIssue } from '../../../types/issue.types' /** * Helper function to extract all text from an issue and its comments */ export function extractAllText(issue: JiraIssue, commentsResponse: IssueCommentResponse): string { const summary = issue.fields.summary const descriptionText = extractTextFromDescription(issue.fields.description) const commentsText = commentsResponse.comments.map((comment) => extractTextFromComment(comment)).join(' ') return `${summary} ${descriptionText} ${commentsText}` }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tbreeding/jira-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server