Skip to content

Conversation

@yas-okadatech
Copy link

@yas-okadatech yas-okadatech commented Mar 14, 2025

ref: https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2046

current /search API will be deprecated on May 1 2025, so I modified to use new API

@yas-okadatech yas-okadatech self-assigned this Mar 14, 2025
@yas-okadatech yas-okadatech changed the title use new jql search API [DONT MERGE]use new jql search API Mar 14, 2025
@yas-okadatech yas-okadatech marked this pull request as draft March 14, 2025 09:44
@kentoyoshida kentoyoshida requested a review from Copilot March 17, 2025 03:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the JQL search API usage to conform with the new endpoint, addressing the upcoming deprecation warning for the current /search API. Key changes include:

  • Switching the searchIssues API to return a Pair containing the issues list and the nextPageToken.
  • Updating pagination logic in both preview and non-preview modes.
  • Revising the search request body and API endpoint constant to match the new JIRA search API.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/main/java/org/embulk/input/jira/JiraInputPlugin.java Updated usage of searchIssues() to handle nextPageToken and pagination changes.
src/main/java/org/embulk/input/jira/client/JiraClient.java Adjusted the searchIssues() method and request body to use nextPageToken, and updated the error handling accordingly.
src/main/java/org/embulk/input/jira/Constant.java Changed the API endpoint to use the new "rest/api/latest/search/jql" URI.
Comments suppressed due to low confidence (2)

src/main/java/org/embulk/input/jira/JiraInputPlugin.java:171

  • [nitpick] Consider revising the log message to indicate that pagination is now driven by the nextPageToken rather than a simple page counter, to better reflect the new API behavior.
LOGGER.info(String.format("Fetching page %d", (currentPage + 1)));

src/main/java/org/embulk/input/jira/client/JiraClient.java:262

  • Verify that the comma-separated format for the 'expand' parameter matches the new API requirements; if the API expects an array format, consider reverting to the previous implementation.
final String expands = task.getExpand().stream().collect(Collectors.joining(","));

@yas-okadatech yas-okadatech changed the title [DONT MERGE]use new jql search API use new jql search API Mar 21, 2025
@yas-okadatech yas-okadatech changed the base branch from migrate_for_embulk_v0_1x to master March 21, 2025 06:30
@yas-okadatech yas-okadatech marked this pull request as ready for review March 21, 2025 06:30
Copy link

@kentoyoshida kentoyoshida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yas-okadatech yas-okadatech merged commit 2692818 into master Mar 24, 2025
@yas-okadatech yas-okadatech deleted the 31716-new-api branch March 24, 2025 00:55
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.

2 participants