Jira and Confluence refresh logic#313
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Someone is attempting to deploy a commit to the Sim Studio Team on Vercel. A member of the Team first needs to authorize it. |
waleedlatif1
left a comment
There was a problem hiding this comment.
just fix this and also run ./scripts/generate-docs.sh in the root to generate the updated page for the jira doc
|
|
||
| #### Output | ||
|
|
||
| This tool does not produce any outputs. |
There was a problem hiding this comment.
The documentation incorrectly states that jira_bulk_read doesn't produce outputs, but the implementation returns an array of issue objects with ts, summary, description, created, and updated fields.
| responseType: 'code', | ||
| pkce: true, | ||
| accessType: 'offline', | ||
| authentication: 'basic', |
There was a problem hiding this comment.
Authentication parameter added to Confluence provider but missing from Jira provider, creating inconsistency between similar Atlassian providers
| throw new Error('No accessible Jira resources found for this account') | ||
| } | ||
|
|
||
| const normalizedInput = `https://${params.domain}`.toLowerCase() |
There was a problem hiding this comment.
Domain normalization duplicated from utils.ts
| return `https://api.atlassian.com/ex/jira/${params.cloudId}/rest/api/3/issue/picker?currentJQL=project=${params.projectId}` | ||
| } | ||
| // If no cloudId, use the accessible resources endpoint | ||
| return 'https://api.atlassian.com/oauth/token/accessible-resources' |
There was a problem hiding this comment.
URL string is duplicated in multiple places
| } | ||
| } else if (provider === 'x') { | ||
| // Handle X differently | ||
| } else if (provider === 'x' || provider === 'confluence' || provider === 'jira') { |
There was a problem hiding this comment.
Missing validation for clientId and clientSecret
| @@ -0,0 +1,204 @@ | |||
| import { ToolConfig } from '../types' | |||
| import { JiraRetrieveBulkParams, JiraRetrieveResponseBulk } from './types' | |||
There was a problem hiding this comment.
Rule violated: Enforce Utility Function Placement by Usage Pattern
Missing import of getJiraCloudId utility function that should be reused
Description
Jira and Confluence refresh token logic was erroring, so I added these minor changes that matched other token refresh token logic. It should have been there originally.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
I changed the auth token expiration time to now, reran the tool, and verified that the refresh token logic ran in the logs.
Checklist:
npm test)Security Considerations:
Additional Information:
Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.