fix(ci): need to pass in labels separately

This commit is contained in:
madonuko
2026-02-07 16:30:29 +08:00
parent 257d028dac
commit cb8ef5fd3b
+7 -7
View File
@@ -1,16 +1,16 @@
import "anda::cfg" as cfg;
fn pr(branch, dir, spec) {
fn pr(branch, dir, spec, scope) {
sh(`git checkout ${branch}`, #{});
if sh(`git stash apply`, #{}).ctx.rc != 0 {
sh(`git reset HEAD ${dir}`, #{});
return;
}
if sh(`git commit -S -m "bump(${labels.scope}): ${spec}" ${dir}`, #{}).ctx.rc != 0 {
if sh(`git commit -S -m "bump(${scope}): ${spec}" ${dir}`, #{}).ctx.rc != 0 {
sh(`git reset HEAD ${dir}`, #{});
return;
}
sh(`gh pr create --title '[${branch}] bump(${labels.scope}): ${spec}' --body 'Automatic bump from CI\n\nnosync'`, #{});
sh(`gh pr create --title '[${branch}] bump(${scope}): ${spec}' --body 'Automatic bump from CI\n\nnosync'`, #{});
sh(`git reset --hard HEAD^`, #{});
}
@@ -26,9 +26,9 @@ for dir in filelist {
continue;
}
sh(`git stash push -m "bump(${labels.scope}): ${spec}" -- ${dir}`, #{});
pr("frawhide", dir, spec);
pr("f43", dir, spec);
pr("f42", dir, spec);
pr("el10", dir, spec);
pr("frawhide", dir, spec, labels.scope);
pr("f43", dir, spec, labels.scope);
pr("f42", dir, spec, labels.scope);
pr("el10", dir, spec, labels.scope);
sh(`git stash drop`, #{});
}