Skip to content

Commit aa82699

Browse files
janiszclaudeporridge
authored
ROX-33193: Jira Cloud support (#64)
* feat: add Jira Cloud support with go-atlassian v2.3.0 Migrate from andygrunwald/go-jira to ctreminiom/go-atlassian v2.3.0 to support Jira Cloud instances that require the new /rest/api/3/search/jql endpoint. The old /rest/api/[2|3]/search endpoints were deprecated and removed from Jira Cloud (effective May 1, 2025). Key changes: - Replace go-jira with go-atlassian v2.3.0 - Use SearchJQL() method for new /search/jql endpoint - Support Basic Auth with email + API token (required for Jira Cloud) - Use Atlassian Document Format (ADF) for issue descriptions and comments - Request summary field explicitly in search to fix nil field issue Fixes issue search and comment creation for Jira Cloud instances. Related: ctreminiom/go-atlassian#345 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Convert issue and comment templates to Atlassian Document Format (ADF) Jira Cloud no longer supports Wiki Markup formatting and requires Atlassian Document Format (ADF) for issue descriptions and comments. Changes: - Remove Wiki Markup template (desc constant) - Implement buildADFDescription() to generate proper ADF structure - Use ADF for both issue creation and comment creation - Add proper ADF node types: heading, codeBlock, table, paragraph - Fix empty field handling: use space for empty BUILD TAG and ORCHESTRATOR to ensure text nodes always have the required 'text' field - Update description() return type from string to *models.CommentNodeScheme - Update newIssue() to accept ADF description directly The ADF structure includes: - H3 headings for each section (Message, STDERR, STDOUT, ERROR) - Code blocks with language="text" for test output - Table with bold headers for Build Information - Proper text nodes with marks for links and formatting This fixes the "INVALID_INPUT" error that occurred when creating comments with empty table cells, which was caused by text nodes missing the required 'text' field. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Update tests to use go-atlassian models instead of go-jira Fix test compilation errors after migrating from go-jira to go-atlassian: - Update imports from github.com/andygrunwald/go-jira to go-atlassian models - Replace jira.Issue with models.IssueScheme - Replace jira.IssueFields with models.IssueFieldsScheme - Update TestDescription to verify ADF structure instead of Wiki Markup - Verify ADF node types, headings, code blocks, and tables - Test truncation functionality with ADF format All tests now pass successfully. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Apply suggestions from code review Co-authored-by: Marcin Owsiany <marcin@owsiany.pl> * docs: add Jira API token documentation Add authentication documentation to README and include the API token URL in the error message to help users obtain their credentials. Addresses PR feedback requesting token URL documentation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: Marcin Owsiany <marcin@owsiany.pl>
1 parent e074d1b commit aa82699

6 files changed

Lines changed: 406 additions & 126 deletions

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,17 @@ Usage of junit2jira:
6161
print version information and exit
6262
```
6363
64+
*Authentication*
65+
66+
For Jira Cloud authentication, you need to provide:
67+
- `JIRA_USER`: Your Jira account email address
68+
- `JIRA_TOKEN`: Your Jira API token (get it from https://id.atlassian.com/manage-profile/security/api-tokens)
69+
6470
*Example usage*
6571
```shell
66-
JIRA_TOKEN="..." junit2jira \
72+
JIRA_USER="user@example.com" \
73+
JIRA_TOKEN="..." \
74+
junit2jira \
6775
-jira-url "https://..." \
6876
-junit-reports-dir "..." \
6977
-base-link "https://..." \

0 commit comments

Comments
 (0)