feat: mirror report issues to jira - #2046
Open
emlimlf wants to merge 1 commit into
Open
Conversation
Signed-off-by: Efren Lim <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds best-effort Jira mirroring for user-reported issues while migrating GitHub issue creation to GitHub App authentication.
Changes:
- Adds Jira OAuth and issue creation support.
- Introduces shared report formatting utilities and tests.
- Adds GitHub App and Jira runtime configuration.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
frontend/setup/runtime-config.ts |
Adds GitHub App and Jira configuration. |
frontend/server/utils/report.ts |
Builds shared issue titles and descriptions. |
frontend/server/utils/report.test.ts |
Tests report formatting utilities. |
frontend/server/data/jira/jira.api.ts |
Implements Jira authentication and issue creation. |
frontend/server/data/github/github.api.ts |
Migrates issue creation to GitHub App authentication. |
frontend/server/api/report/index.post.ts |
Mirrors created GitHub issues to Jira. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5
to
+7
| export function buildIssueTitle(body: ReportRequest): string { | ||
| return `[Report issue] ${body.projectName ? `${body.projectName} ${body.widget}` : body.pageTitle}`; | ||
| } |
Comment on lines
+25
to
+26
| try { | ||
| await createJiraIssue({ |
Comment on lines
+16
to
+18
| githubAppId: '', | ||
| githubAppInstallationId: '', | ||
| githubAppPrivateKey: '', |
Comment on lines
+18
to
+20
| const pem = githubAppPrivateKey.includes('BEGIN') | ||
| ? githubAppPrivateKey.replace(/\\n/g, '\n') | ||
| : Buffer.from(githubAppPrivateKey, 'base64').toString('utf8'); |
Comment on lines
+25
to
+35
| const { access_token: accessToken } = await $fetch<{ access_token: string }>( | ||
| 'https://auth.atlassian.com/oauth/token', | ||
| { | ||
| method: 'POST', | ||
| body: { | ||
| grant_type: 'client_credentials', | ||
| client_id: clientId, | ||
| client_secret: clientSecret, | ||
| }, | ||
| }, | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
server/data/jira/jira.api.ts) and description builder (server/utils/report.ts)This PR adds new runtime config keys in
frontend/setup/runtime-config.ts. Add these to.env/ deployment secrets before deploying (Nuxt maps runtime config keys toNUXT_<SCREAMING_SNAKE_CASE>env vars):NUXT_GITHUB_APP_IDNUXT_GITHUB_APP_INSTALLATION_IDNUXT_GITHUB_APP_PRIVATE_KEYNUXT_JIRA_BASE_URL(defaults tohttps://linuxfoundation.atlassian.net, only needed to override)NUXT_JIRA_CLIENT_IDNUXT_JIRA_CLIENT_SECRETNUXT_JIRA_REPORT_PROJECT_KEY(defaults toDE, only needed to override)NUXT_JIRA_REPORT_ASSIGNEE_ACCOUNT_IDRef: IN-1207
Test plan
pnpm lintpnpm tsc-checkpnpm build🤖 Generated with Claude Code