Skip to content

feat/jira-app#70

Merged
woywro merged 1 commit into
devfrom
feat/jira-app
May 8, 2026
Merged

feat/jira-app#70
woywro merged 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 Forge bridge integration for Jira comment posting with shared secret authentication.
    • New dispatch endpoint for receiving Jira events with request validation and project prefix filtering.
    • Comment posting now supports fallback between Forge and direct Jira API.
  • Tests

    • Expanded test coverage for Forge-based comment posting scenarios and error handling.

@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.

@woywro woywro merged commit 7612bf2 into dev May 8, 2026
1 of 2 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 09173eef-2a11-4d88-92fa-1a77ab49c3ef

📥 Commits

Reviewing files that changed from the base of the PR and between 9ebbec5 and f5bc5ee.

📒 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 integration to the Jira adapter, enabling comment posting via Forge triggers with shared-secret validation. The implementation includes environment configuration, conditional routing in postComment, a new authenticated dispatch endpoint, adapter wiring, and comprehensive test coverage.

Changes

Forge Jira Bridge Implementation

Layer / File(s) Summary
Environment Configuration
.env.example, env.ts
Introduces FORGE_SHARED_SECRET and FORGE_COMMENT_URL environment variables with schema validation and documentation comments.
JiraConfig Forge Fields
src/adapters/issue-tracker/jira.ts
Extends JiraConfig with optional forgeCommentUrl and forgeSharedSecret fields.
Forge Comment Implementation
src/adapters/issue-tracker/jira.ts
postComment conditionally routes to new postCommentViaForge method when Forge config is present; Forge path POSTs with x-shared-secret header, parses { id, permalinkPath }, and handles 404→IssueTrackerNotFoundError mapping.
Adapter Supporting Changes
src/adapters/issue-tracker/jira.ts
Improves error reporting in request, normalizes contentUrl in attachment mapping, and reformats acceptance-criteria regex pattern.
Adapter Factory Wiring
src/lib/adapters.ts, src/lib/step-adapters.ts
Both factories now pass FORGE_COMMENT_URL and FORGE_SHARED_SECRET from environment into JiraAdapter constructor.
Forge Dispatch Endpoint
src/routes/jira/dispatch.post.ts
New authenticated POST handler validates x-forge-secret with constant-time comparison, filters by project prefix, dispatches tickets, and returns structured dispatch status.
Forge Comment Tests
src/adapters/issue-tracker/jira.test.ts
New test suite validates Forge request headers/body shape, deep-link construction, null-field handling, 404 error mapping, non-2xx error throwing, and fallback to direct Jira when Forge secret is absent.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Blazity/ai-workflow#68: Adds Forge integration for Jira with FORGE_SHARED_SECRET in env and authenticated /jira/dispatch endpoint.
  • Blazity/ai-workflow#61: Modifies JiraAdapter.postComment behavior and return type with corresponding test updates.
  • Blazity/ai-workflow#52: Updates Jira issue-tracker adapter and tests in src/adapters/issue-tracker/jira.ts.

Poem

🐰 A bridge of secrets, forged with care,
Through Jira's realm, our comments share,
With constant-time checks and headers true,
The rabbit's proxy brings all through! 🌟

✨ 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 mentioned this pull request May 8, 2026
This was referenced May 8, 2026
Merged
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