Skip to content

Jira and Confluence refresh logic#313

Merged
waleedlatif1 merged 8 commits intosimstudioai:mainfrom
aadamgough:main
May 1, 2025
Merged

Jira and Confluence refresh logic#313
waleedlatif1 merged 8 commits intosimstudioai:mainfrom
aadamgough:main

Conversation

@aadamgough
Copy link
Copy Markdown
Contributor

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.

  • Bug fix (non-breaking change which fixes an issue)

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:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (npm test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

Additional Information:

Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 8:32am

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2025

Someone is attempting to deploy a commit to the Sim Studio Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Collaborator

@waleedlatif1 waleedlatif1 left a comment

Choose a reason for hiding this comment

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

just fix this and also run ./scripts/generate-docs.sh in the root to generate the updated page for the jira doc

Comment thread sim/tools/jira/retrieve_bulk.ts Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

mrge found 6 issues across 9 files. View them in mrge.io

Comment thread docs/content/docs/tools/jira.mdx Outdated

#### Output

This tool does not produce any outputs.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread sim/lib/auth.ts
responseType: 'code',
pkce: true,
accessType: 'offline',
authentication: 'basic',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

URL string is duplicated in multiple places

Comment thread sim/lib/oauth.ts
}
} else if (provider === 'x') {
// Handle X differently
} else if (provider === 'x' || provider === 'confluence' || provider === 'jira') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing validation for clientId and clientSecret

@@ -0,0 +1,204 @@
import { ToolConfig } from '../types'
import { JiraRetrieveBulkParams, JiraRetrieveResponseBulk } from './types'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Rule violated: Enforce Utility Function Placement by Usage Pattern

  Missing import of getJiraCloudId utility function that should be reused

@waleedlatif1 waleedlatif1 merged commit ca34c72 into simstudioai:main May 1, 2025
3 of 4 checks passed
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