feat(conf): support prefix scope matching and release config fallback #102

Open
张泊明518370910136 wants to merge 2 commits from feat/prefix-scope-matching-and-fallback into master

This PR implements prefix scope matching for floating releases and robust release configuration fallback in JOJ3.

Summary of Changes:

  1. Prefix Scope Matching (findBestMatchingScope): Allows custom release tags (e.g. alpha1, alpha-patch) to match existing scope directories (e.g. .joj/alpha/conf.json) via longest prefix matching without requiring separate directories for each custom tag.
  2. Single Release Config Fallback: If no scope directory matches, falls back to the single release configuration file (e.g. .joj/conf.json). Fixed potential directory stat issue when fallbackConfFileName is empty.
  3. Unit Tests: Added comprehensive unit tests in cmd/joj3/conf/conf_test.go covering exact match, prefix scope match, fallback, and missing configuration cases.
  4. ASCII Compliance: Ensured code and comments are 100% ASCII compliant.
This PR implements prefix scope matching for floating releases and robust release configuration fallback in JOJ3. ### Summary of Changes: 1. **Prefix Scope Matching (findBestMatchingScope)**: Allows custom release tags (e.g. alpha1, alpha-patch) to match existing scope directories (e.g. .joj/alpha/conf.json) via longest prefix matching without requiring separate directories for each custom tag. 2. **Single Release Config Fallback**: If no scope directory matches, falls back to the single release configuration file (e.g. .joj/conf.json). Fixed potential directory stat issue when fallbackConfFileName is empty. 3. **Unit Tests**: Added comprehensive unit tests in cmd/joj3/conf/conf_test.go covering exact match, prefix scope match, fallback, and missing configuration cases. 4. **ASCII Compliance**: Ensured code and comments are 100% ASCII compliant.
张泊明518370910136 added 1 commit 2026-07-28 15:57:14 +08:00
feat(conf): support prefix scope matching and release config fallback
All checks were successful
build / build (pull_request) Successful in 2m14s
build / build (push) Successful in 2m17s
build / trigger-build-image (push) Has been skipped
build / trigger-build-image (pull_request) Has been skipped
edf5c617be
张泊明518370910136 added 1 commit 2026-07-28 16:28:34 +08:00
chore(deps): upgrade dependencies for security fixes
Some checks failed
build / build (pull_request) Failing after 1m2s
build / build (push) Failing after 1m4s
build / trigger-build-image (pull_request) Has been skipped
build / trigger-build-image (push) Has been skipped
1bc1644367
张泊明518370910136 force-pushed feat/prefix-scope-matching-and-fallback from 1bc1644367 to edf5c617be 2026-07-28 16:31:02 +08:00 Compare
张泊明518370910136 added 1 commit 2026-07-28 17:49:44 +08:00
chore(deps): upgrade dependencies for Go 1.24 compatibility without modifying go-judge/pb
All checks were successful
build / build (push) Successful in 3m25s
build / build (pull_request) Successful in 3m18s
build / trigger-build-image (push) Has been skipped
build / trigger-build-image (pull_request) Has been skipped
c3269e8056
All checks were successful
build / build (push) Successful in 3m25s
Required
Details
build / build (pull_request) Successful in 3m18s
Required
Details
build / trigger-build-image (push) Has been skipped
build / trigger-build-image (pull_request) Has been skipped
This pull request has changes conflicting with the target branch.
  • cmd/joj3/conf/conf.go
  • cmd/joj3/conf/conf_test.go

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/prefix-scope-matching-and-fallback:feat/prefix-scope-matching-and-fallback
git checkout feat/prefix-scope-matching-and-fallback
Sign in to join this conversation.
No description provided.