diff --git a/andax/ci/update_pr.rhai b/andax/ci/update_pr.rhai index 248f46bba5..2912e7e0d5 100644 --- a/andax/ci/update_pr.rhai +++ b/andax/ci/update_pr.rhai @@ -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`, #{}); }