mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-08 08:04:25 +00:00
fix(cli): use wmill.yaml key consistently for workspace-specific items (#8900)
* fix(cli): use wmill.yaml key (not branch name) for workspace-specific filenames
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(cli): resolve --workspace as config key even with --base-url
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(integration): assert workspace config key drives filename suffix in git-sync
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Revert "test(integration): assert workspace config key drives filename suffix in git-sync"
This reverts commit 528993fe29.
* fix(cli): filter reserved keys and preserve validation-skip on non-config --workspace
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
d6c642b170
commit
1722a7a2af
@@ -180,20 +180,25 @@ export async function findResourceFile(path: string) {
|
||||
let contentBasePathJSON = splitPath[0] + "." + splitPath[1] + ".json";
|
||||
let contentBasePathYAML = splitPath[0] + "." + splitPath[1] + ".yaml";
|
||||
|
||||
// Check for branch-specific metadata files first
|
||||
// Check for workspace-specific metadata files first, using the wmill.yaml
|
||||
// config key for the current git branch as the filename suffix (falls back
|
||||
// to the branch name when no matching workspace entry exists).
|
||||
const currentBranch = getCurrentGitBranch();
|
||||
const wsName = currentBranch
|
||||
? await specificItems.resolveWsNameForGitBranch(currentBranch)
|
||||
: null;
|
||||
|
||||
const candidates = [contentBasePathJSON, contentBasePathYAML];
|
||||
|
||||
if (currentBranch) {
|
||||
// Add branch-specific candidates at the beginning (higher priority)
|
||||
if (wsName) {
|
||||
// Add workspace-specific candidates at the beginning (higher priority)
|
||||
const branchSpecificJSON = specificItems.toWorkspaceSpecificPath(
|
||||
contentBasePathJSON,
|
||||
currentBranch
|
||||
wsName
|
||||
);
|
||||
const branchSpecificYAML = specificItems.toWorkspaceSpecificPath(
|
||||
contentBasePathYAML,
|
||||
currentBranch
|
||||
wsName
|
||||
);
|
||||
candidates.unshift(branchSpecificJSON, branchSpecificYAML);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user