Skip to content

feat/jira-app#73

Closed
woywro wants to merge 1 commit into
devfrom
feat/jira-app
Closed

feat/jira-app#73
woywro wants to merge 1 commit into
devfrom
feat/jira-app

Conversation

@woywro
Copy link
Copy Markdown
Collaborator

@woywro woywro commented May 8, 2026

Summary by CodeRabbit

  • New Features
    • Added support for Forge bridge integration as an alternative authentication method for Jira comment posting
    • Introduced new configuration variables to enable Forge bridge setup
    • New dispatch endpoint to handle Forge-based requests with shared secret authentication

This reverts commit 0f319df.
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 628ed629-15d4-42bc-bfeb-24a20b79f6f6

📥 Commits

Reviewing files that changed from the base of the PR and between eac7332 and 13fbfe6.

📒 Files selected for processing (7)
  • .env.example
  • env.ts
  • src/adapters/issue-tracker/jira.test.ts
  • src/adapters/issue-tracker/jira.ts
  • src/lib/adapters.ts
  • src/lib/step-adapters.ts
  • src/routes/jira/dispatch.post.ts

📝 Walkthrough

Walkthrough

This PR adds Forge bridge authentication and comment posting to Jira integration. It introduces Forge-specific environment variables, extends JiraAdapter to conditionally route comments through Forge or fall back to basic Jira REST API, wires the new config through adapter factories, creates a new /jira/dispatch endpoint with constant-time-comparison authentication, and includes comprehensive test coverage.

Changes

Forge Bridge Jira Integration

Layer / File(s) Summary
Configuration Schema
.env.example, env.ts
New FORGE_SHARED_SECRET and FORGE_COMMENT_URL environment variables with documentation and schema validation.
JiraAdapter Configuration Interface
src/adapters/issue-tracker/jira.ts
JiraConfig extended with optional forgeCommentUrl and forgeSharedSecret fields. Request error handling improved with more detailed messages. Attachment formatting refactored while preserving extraction and sanitization logic.
Comment Posting via Forge or REST API
src/adapters/issue-tracker/jira.ts
JiraAdapter.postComment() conditionally routes to new private postCommentViaForge() when Forge config is present. Forge path posts issueKey and body with x-shared-secret header, returns browse URL from Forge response id and permalinkPath, throws IssueTrackerNotFoundError on 404. Falls back to standard Jira REST API when Forge config absent. Acceptance criteria regex formatting updated.
Adapter Factory Wiring
src/lib/adapters.ts, src/lib/step-adapters.ts
createAdapters() and createStepAdapters() pass FORGE_SHARED_SECRET and FORGE_COMMENT_URL from environment into JiraAdapter instantiation.
Forge Dispatch Endpoint Handler
src/routes/jira/dispatch.post.ts
New POST endpoint that authenticates via X-Forge-Secret header using constant-time comparison against FORGE_SHARED_SECRET. Validates issueKey format and enforces Jira project-prefix matching. Logs dispatch metadata including optional source, cloudId, and payloadStatus. Invokes dispatchTicket and returns structured response (dispatched/skipped with ticket key and reason).
Tests
src/adapters/issue-tracker/jira.test.ts
Forge comment bridge test suite covering: successful POST with x-shared-secret header and JSON body containing issueKey and body, null response when Forge omits id and permalinkPath, 404 mapping to IssueTrackerNotFoundError, non-2xx error handling with HTTP status in message, and fallback to basic Jira REST API when forgeSharedSecret is omitted.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • Blazity/ai-workflow#70: Implements identical Forge bridge changes (FORGE env vars, JiraAdapter forge fields, postCommentViaForge routing, adapters wiring, and /jira/dispatch endpoint).
  • Blazity/ai-workflow#68: Introduces FORGE_SHARED_SECRET and /jira/dispatch endpoint authentication; this PR extends with forgeCommentUrl wiring and Forge-backed comment posting implementation.
  • Blazity/ai-workflow#52: Modifies JiraAdapter error handling and 404 to IssueTrackerNotFoundError mapping that is reused by the new Forge comment posting path.

Poem

🐰 A Forge bridge springs to life today,
Secrets safe in headers' way,
Comments fly with time-safe auth,
No more REST calls—Forge charts the path! 🔗✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'feat/jira-app' is too vague and generic. It uses a conventional prefix but provides no meaningful information about what the changeset actually implements. Replace the vague title with a specific description of the main feature being added, such as 'Add Forge bridge support for Jira comments and dispatch authentication' or 'Implement Jira Forge bridge integration'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

@woywro woywro closed this May 8, 2026
@woywro woywro deleted the feat/jira-app branch May 8, 2026 07:58
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.

1 participant