Skip to content

feat: mirror report issues to jira - #2046

Open
emlimlf wants to merge 1 commit into
mainfrom
feat/IN-1207
Open

feat: mirror report issues to jira#2046
emlimlf wants to merge 1 commit into
mainfrom
feat/IN-1207

Conversation

@emlimlf

@emlimlf emlimlf commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Mirrors user-submitted report issues to a Jira project (best-effort — the report still succeeds if Jira is unreachable or unconfigured)
  • Adds a Jira API client (server/data/jira/jira.api.ts) and description builder (server/utils/report.ts)
  • Extends GitHub issue creation to support GitHub App auth

⚠️ New environment variables required

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 to NUXT_<SCREAMING_SNAKE_CASE> env vars):

  • NUXT_GITHUB_APP_ID
  • NUXT_GITHUB_APP_INSTALLATION_ID
  • NUXT_GITHUB_APP_PRIVATE_KEY
  • NUXT_JIRA_BASE_URL (defaults to https://linuxfoundation.atlassian.net, only needed to override)
  • NUXT_JIRA_CLIENT_ID
  • NUXT_JIRA_CLIENT_SECRET
  • NUXT_JIRA_REPORT_PROJECT_KEY (defaults to DE, only needed to override)
  • NUXT_JIRA_REPORT_ASSIGNEE_ACCOUNT_ID

Ref: IN-1207

Test plan

  • pnpm lint
  • pnpm tsc-check
  • pnpm build
  • Manually tested report submission mirrors to Jira (DE project)
  • Set new env vars in staging/production before deploy

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 29, 2026 05:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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,
},
},
);
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