From ec2a1b0bd0dd6542b9b26790a1a001c307c2b156 Mon Sep 17 00:00:00 2001 From: Fangxun Zhao Date: Mon, 30 Nov 2026 15:38:36 +0800 Subject: [PATCH] fix(ci): skip release lookup for unversioned PRs Only require a configured release line after changelog or Linglong versions change. Pure code PRs return unchanged first. Log: Allow unversioned PRs on unregistered G2 maintenance branches. Influence: release/* code fixes are no longer blocked by the group version guard. PMS: TASK-398637 --- .github/workflows/verify-group-version.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/verify-group-version.yml b/.github/workflows/verify-group-version.yml index 7e66e7b4f..2fb633ceb 100644 --- a/.github/workflows/verify-group-version.yml +++ b/.github/workflows/verify-group-version.yml @@ -188,10 +188,6 @@ jobs: branch = f"baseline/{group}" baseline_version = cfg["groups"][group].get("version") if group == "G2": - if "versions" in cfg["groups"][group]: - line = release_line(cfg, pr["base"]["ref"]) - branch = f"baseline/{line}/G2" - baseline_version = cfg["groups"][group]["versions"][line] previous = linglong_versions(repo, pr["base"]["sha"]) recipes = linglong_versions(source["full_name"], pr["head"]["sha"]) removed = previous.keys() - recipes.keys() @@ -204,6 +200,10 @@ jobs: raise RuntimeError(f"G2 {path} 版本只能升版: {previous[path]} -> {version}") if before == after and previous == recipes: return "版本信息未变化" + if "versions" in cfg["groups"][group]: + line = release_line(cfg, pr["base"]["ref"]) + branch = f"baseline/{line}/G2" + baseline_version = cfg["groups"][group]["versions"][line] query = urlencode({"state": "all", "head": f"{owner}:{branch}", "sort": "created", "direction": "desc", "per_page": 1}) prs = api(f"repos/{baseline}/pulls?{query}")