Skip to main content
Glama
generateChangeLogsForIssue.ts1.28 kB
/** * Jira issue changelog generation utilities * * This file provides functionality for generating and processing changelogs for * Jira issues. It handles the retrieval and transformation of raw changelog data * into a structured format that can be used for issue analysis and tracking. */ import { Success, Failure } from '../../../utils/try' import createGetIssueChangeLogs from './createGetIssueChangeLogs' import type Try from '../../../utils/try' import type { IssueChangeLogEntry } from '../../types/issue.types' import type { JiraApiConfig } from '../apiTypes' export default async function* generateChangeLogsForIssue( issueIdOrKey: string, config: JiraApiConfig, ): AsyncGenerator<Try<IssueChangeLogEntry>, void, unknown> { const getIssueChangeLogs = createGetIssueChangeLogs(config, issueIdOrKey) const maxResults = 50 let shouldContinue = true let nextStartAt = 0 do { const { error, value } = await getIssueChangeLogs(nextStartAt, maxResults) if (error) { yield Failure(error) return } const { startAt, values: changeLogs, isLast } = value if (!changeLogs?.length) break shouldContinue = !isLast nextStartAt = startAt + maxResults for (const changeLog of changeLogs) { yield Success(changeLog) } } while (shouldContinue) }

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