fix(frontend): make dev footer version link to commit#3913
fix(frontend): make dev footer version link to commit#3913preeeetham wants to merge 1 commit intoOWASP:mainfrom
Conversation
|
Caution Review failedThe pull request is closed. Summary by CodeRabbit
WalkthroughReplaces branching rendering in Footer with a single Link whose href conditionally targets a GitHub release or commit based on ENVIRONMENT and RELEASE_VERSION; adds unit tests (two equivalent suites present) that mock env to verify commit vs. release link rendering in non-production scenarios. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Footer version is now always a clickable link - Production: links to release tag (unchanged) - Non-production with dash in RELEASE_VERSION: links to commit (e.g. 24.2.10-12c25c5 → /commit/12c25c5) - Non-production without dash: falls back to release tag URL - Added unit tests for Version Link Behavior Co-authored-by: Cursor <cursoragent@cursor.com>
5b10be6 to
c5f1ce9
Compare
|
|
Closing to create a fresh PR with a clean commit (no Co-authored-by, single focused change) |



Proposed change
Resolves #3892
Makes the release version at the bottom of https://nest.owasp.dev/ a clickable link to the corresponding Git commit, while keeping the existing behavior on https://nest.owasp.org/.
Changes:
frontend/src/components/Footer.tsx: Version is now always a clickable link. In production → links to release tag; in non-production → links to commit (parses short SHA from RELEASE_VERSION when it contains a dash). Falls back to release tag URL when RELEASE_VERSION has no dash.frontend/__tests__/unit/components/Footer.test.tsx: Added tests for non-production commit link and no-dash fallback.Checklist
make check-testlocally: all warnings addressed, tests passed