mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5680] [CLOSED] refactor(xray): extract minimum eligible release tag for filtering #5959
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5959
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5680
Author: @Tomilla
Created: 6/30/2026
Status: ❌ Closed
Base:
main← Head:refactor/xray-min-version-filter-const📝 Commits (2)
96348e4refactor(xray): name minimum eligible release tag432cc82test(xray): use subtests for release tag cases📊 Changes
2 files changed (+54 additions, -14 deletions)
View changed files
📝
internal/web/service/server.go(+32 -14)📝
internal/web/service/server_xray_checksum_test.go(+22 -0)📄 Description
Summary
Extract the minimum eligible Xray release tag into a named constant and reuse it in the GitHub release filtering logic. This keeps the threshold defined in one place instead of hardcoding the version inline.
Why
The previous comparison duplicated the minimum supported release threshold directly in the filtering condition, which made the intent harder to read and future updates more error-prone. A named constant makes the compatibility boundary explicit and simpler to maintain.
Previous implementation:
Reference:
Type of change
Areas affected
How was this tested?
v26.6.27are excluded andv26.6.27and newer tags are included.Screenshots / recordings
N/A
Breaking changes
None
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.