-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[FIX] JIRA responding that the API has been removed #18240
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughUpdates primarily bump version metadata across multiple Jira actions and sources. Functional changes migrate issue option loading from getIssues to searchIssues with JQL and field filtering, rename/add the search method in jira.app, and refactor the JQL search action to call jira.searchIssues directly, removing a local wrapper. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User as Config UI
participant CreateIssue as Create Issue Action
participant Common as common/issue.getOptions
participant App as jira.app
participant Jira as Jira API
Note over User,CreateIssue: Configure "parent" prop options
User->>CreateIssue: Request options for parent
CreateIssue->>Common: getOptions(FIELD_KEY.PARENT)
Common->>App: searchIssues({ jql, fields: "id,key", maxResults, startAt, cloudId })
App->>Jira: GET /search/jql?jql=project%20is%20not%20EMPTY...&fields=id,key
Jira-->>App: { issues: [ { id, key }, ... ] }
App-->>Common: issues
Common-->>CreateIssue: map to [{ value:id, label:key }]
CreateIssue-->>User: Options list
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
components/jira/actions/get-issue/get-issue.mjs (1)
60-66: Don’t JSON-parse thepropertiesquery param.
Jira’s Get Issue expects a comma-separated list (e.g., "*all" or "foo,bar"), not JSON. Parsing drops valid user input. Pass the string through as-is (or split/trim if you want an array), matching the description above.- let properties; - try { - properties = JSON.parse(this.properties); - } catch (err) { - //pass - } + const properties = this.properties; // Comma-separated string per Jira APIcomponents/jira/actions/create-version/create-version.mjs (1)
91-91: Fix typo in user-facing summary.
“successfuly” → “successfully”.- $.export("$summary", `Version has been created successfuly. (ID:${response.id}, NAME:${response.name})`); + $.export("$summary", `Version has been created successfully. (ID:${response.id}, NAME:${response.name})`);components/jira/actions/get-all-projects/get-all-projects.mjs (1)
24-29: Correct misleading prop description.
This action fetches projects; the current text refers to “issue properties”.properties: { propDefinition: [ jira, "properties", ], - description: "Details of issue properties to be add or update, please provide an array of objects with keys and values.", + description: "Project properties to include in the response. Provide a JSON array of property keys (e.g., [\"foo\",\"bar\"]).", },components/jira/actions/delete-project/delete-project.mjs (1)
41-41: Fix summary string interpolation and typoThe summary won’t interpolate and has a typo.
- $.export("$summary", "Project with ID: ${this.projectID} has been deleted successfuly."); + $.export("$summary", `Project with ID: ${this.projectID} has been deleted successfully.`);
🧹 Nitpick comments (12)
components/jira/actions/create-issue/create-issue.mjs (1)
125-125: Fix typo in user-facing summary.
"successfuly" → "successfully".- $.export("$summary", `Issue has been created successfuly. (ID:${response.id}, KEY:${response.key})`); + $.export("$summary", `Issue has been created successfully. (ID:${response.id}, KEY:${response.key})`);components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs (2)
56-59: Avoid relying on privateform-datainternals for headers.
Usedata.getHeaders()instead ofdata._boundaryto build the Content-Type reliably across versions.- const headers = { - "Content-Type": `multipart/form-data; boundary=${data._boundary}`, - "X-Atlassian-Token": "no-check", - }; + const headers = { + ...data.getHeaders(), + "X-Atlassian-Token": "no-check", + };
41-70: Consider per-file error handling to not fail the entire batch.
Wrap the body of the loop in try/catch and push structured results (success/error) so users get partial success when one file fails.components/jira/actions/transition-issue/transition-issue.mjs (1)
96-96: Polish the success message.
More natural phrasing.- $.export("$summary", `Transition has performed for the issue with ID(or key): ${this.issueIdOrKey}`); + $.export("$summary", `Transition performed for issue ${this.issueIdOrKey}.`);components/jira/actions/get-all-projects/get-all-projects.mjs (1)
49-56: Remove stray argument not used by getAllProjects.
issueIdOrKeyisn’t a prop here and doesn’t apply to listing projects.resourceFnArgs: { $, - issueIdOrKey: this.issueIdOrKey, params: { recent: this.recent, properties, expand: this.expand, }, },components/jira/actions/update-issue/update-issue.mjs (3)
101-107: Improve config error message and validationAlso require projectId and fix casing to match prop names.
- if (!issueTypeId) { - throw new ConfigurationError("Please enter `projectId` and `IssueTypeId` to retrieve additional props."); - } + if (!projectId || !issueTypeId) { + throw new ConfigurationError("Please enter `projectId` and `issueTypeId` to retrieve additional props."); + }
109-123: Make metadata destructuring resilientIf projects/issuetypes are empty, this destructure can throw. Guard and default safely.
- const { - projects: [ - { - issuetypes: [ - { fields = {} } = {}, - ], - }, - ], - } = await this.app.getCreateIssueMetadata({ + const cim = await this.app.getCreateIssueMetadata({ cloudId, params: { projectIds: projectId, issuetypeIds: issueTypeId, expand: "projects.issuetypes.fields", }, }); + const fields = cim?.projects?.[0]?.issuetypes?.[0]?.fields ?? {};Please verify with a project/issuetype combo that returns zero results.
161-171: Build transition payload only when setCurrent reduce of [transitionId, { id, looped }] is indirect. Construct explicitly to avoid accidental array/undefined artifacts.
- const { transition } = utils.reduceProperties({ - additionalProps: { - transition: [ - transitionId, - { - id: transitionId, - looped: transitionLooped, - }, - ], - }, - }); + const transition = transitionId + ? { id: transitionId, looped: transitionLooped } + : undefined;components/jira/sources/events/events.mjs (1)
8-8: Version bump only — OKWhile here: minor typo in description (Line 17) — “he Jira events” → “The Jira events”.
- description: "he Jira events that trigger the webhook.", + description: "The Jira events that trigger the webhook.",components/jira/jira.app.mjs (2)
99-99: Leverage user query for faster, cheaper dropdownsCurrently the JQL ignores user input. Add useQuery: true to the prop and include query in JQL (as shown in the previous diff) to reduce results and API load.
Additional change outside the modified hunk:
issueIdOrKey: { type: "string", label: "Issue id or key", description: "The ID or key of the issue where the attachment will be added to.", + useQuery: true,
466-471: Good migration to enhanced search endpointRenaming getIssues → searchIssues and targeting /search/jql aligns with Atlassian’s removal of legacy /search endpoints. Keep both GET and POST support to handle very long JQL queries.
- searchIssues(args = {}) { - return this._makeRequest({ - path: "/search/jql", - ...args, - }); - }, + searchIssues({ method = "GET", ...args } = {}) { + return this._makeRequest({ + method, + path: "/search/jql", + ...args, + }); + },Rationale: POST /search/jql supports large JQL bodies and array-typed fields more cleanly. (developer.atlassian.com)
components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs (1)
95-109: Migration to enhanced JQL search is correct; consider exposing cursor pagination.
The new endpoint supports cursor-based pagination via nextPageToken; adding it makes the action usable beyond the first page. (developer.atlassian.com)Apply within this hunk:
const response = await this.jira.searchIssues({ $, cloudId: this.cloudId, params: { jql: this.jql, maxResults: this.maxResults, fields: this.fields, expand: this.expand ? this.expand.join(",") : undefined, properties: this.properties, fieldsByKeys: this.fieldsByKeys, failFast: this.failFast, + nextPageToken: this.nextPageToken, }, });And add a new optional prop (outside this hunk) to pass the token:
nextPageToken: { type: "string", label: "Next Page Token", description: "Cursor returned by the previous response for fetching the next page", optional: true, },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (27)
components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs(1 hunks)components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs(1 hunks)components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs(1 hunks)components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs(1 hunks)components/jira/actions/assign-issue/assign-issue.mjs(1 hunks)components/jira/actions/common/issue.mjs(1 hunks)components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs(1 hunks)components/jira/actions/create-issue/create-issue.mjs(1 hunks)components/jira/actions/create-version/create-version.mjs(1 hunks)components/jira/actions/delete-project/delete-project.mjs(1 hunks)components/jira/actions/get-all-projects/get-all-projects.mjs(1 hunks)components/jira/actions/get-issue/get-issue.mjs(1 hunks)components/jira/actions/get-task/get-task.mjs(1 hunks)components/jira/actions/get-transitions/get-transitions.mjs(1 hunks)components/jira/actions/get-user/get-user.mjs(1 hunks)components/jira/actions/get-users/get-users.mjs(1 hunks)components/jira/actions/list-issue-comments/list-issue-comments.mjs(1 hunks)components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs(2 hunks)components/jira/actions/transition-issue/transition-issue.mjs(1 hunks)components/jira/actions/update-comment/update-comment.mjs(1 hunks)components/jira/actions/update-issue/update-issue.mjs(1 hunks)components/jira/jira.app.mjs(2 hunks)components/jira/package.json(1 hunks)components/jira/sources/events/events.mjs(1 hunks)components/jira/sources/issue-created/issue-created.mjs(1 hunks)components/jira/sources/issue-deleted/issue-deleted.mjs(1 hunks)components/jira/sources/issue-updated/issue-updated.mjs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs (3)
components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs (1)
response(58-64)components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs (1)
response(69-82)components/jira/actions/get-issue/get-issue.mjs (1)
response(66-77)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Lint Code Base
- GitHub Check: Publish TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
🔇 Additional comments (25)
components/jira/actions/create-issue/create-issue.mjs (2)
10-10: Version bump only — looks good.
No functional changes.
21-41: Verify parent issue options use the new search-based API
NoparentpropDefinition was found in components/jira/actions/create-issue/create-issue.mjs; please confirm the parent field is configured to calljira.app.searchIssues({ jql, fields: ['id','key'] })and that no deprecated endpoints remain.components/jira/actions/get-issue/get-issue.mjs (1)
7-7: Version bump only — looks good.
No logic changes.components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs (1)
9-9: Version bump only — looks good.
No functional changes.components/jira/actions/assign-issue/assign-issue.mjs (1)
6-6: Version bump only — looks good.
No behavior change.components/jira/actions/get-transitions/get-transitions.mjs (1)
7-7: Version bump only — looks good.
No logic changes.components/jira/actions/transition-issue/transition-issue.mjs (1)
8-8: Version bump LGTM.
Matches broader Jira component updates.components/jira/actions/create-version/create-version.mjs (1)
7-7: Version bump LGTM.
Consistent with the package-wide patch updates.components/jira/actions/get-users/get-users.mjs (1)
7-7: Version bump LGTM.
No functional changes introduced.components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs (1)
8-8: Version bump LGTM.
No behavior changes.components/jira/actions/get-all-projects/get-all-projects.mjs (1)
7-7: Version bump LGTM.
Aligned with related Jira actions.components/jira/package.json (1)
3-3: Approve version bump and refactor
Confirmed no calls to getIssues(), multiple usages of searchIssues(), and the Parent field’s getOptions now sources via search-based API.components/jira/actions/update-comment/update-comment.mjs (1)
8-8: LGTM: Version bump only.
No functional changes detected.components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs (1)
9-9: LGTM: Version bump only.
No functional changes detected.components/jira/actions/get-user/get-user.mjs (1)
7-7: LGTM: Version bump only.
No functional changes detected.components/jira/actions/get-task/get-task.mjs (1)
7-7: LGTM: Version bump only.
No functional changes detected.components/jira/sources/issue-deleted/issue-deleted.mjs (1)
7-7: Version bump looks goodNo functional changes. Safe to ship.
components/jira/sources/issue-updated/issue-updated.mjs (1)
7-7: Version bump looks goodNo functional changes. Safe to ship.
components/jira/actions/update-issue/update-issue.mjs (1)
11-11: Version bump looks goodNo behavior change detected here.
components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs (1)
6-6: Version bump looks goodNo functional changes. Safe to ship.
components/jira/actions/delete-project/delete-project.mjs (1)
7-7: Version bump looks goodNo logic changes.
components/jira/actions/list-issue-comments/list-issue-comments.mjs (1)
7-7: Version bump only — OKNo functional changes. Safe to merge.
components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs (1)
8-8: Version bump only — OKNo runtime impact.
components/jira/sources/issue-created/issue-created.mjs (1)
7-7: Version bump only — OKNo behavior changes.
components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs (1)
7-7: Version bump looks good.
No concerns with 0.0.4.
WHY
Resolves #18094
Summary by CodeRabbit
New Features
Chores