🔧 chore(ci): extract prepare_repo.sh and clean up workflows

- Extract shared repo-checkout logic into .gitea/ci/prepare_repo.sh,
  removing ~47 lines of duplication from standards-check.yml and test.yml
- Remove unused TEST_WORKSPACE env var from test.yml

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
csh
2026-05-15 15:51:48 +08:00
co-authored by Claude Opus 4.7
parent 7ade85ea1b
commit da08212cd6
2 changed files with 54 additions and 2 deletions
+3 -2
View File
@@ -105,6 +105,7 @@ tracked_skill_exists() {
[ -f "codex/skills/$name/SKILL.md" ]
}
cd "$REPO_DIR"
git config user.name "$COMMIT_AUTHOR_NAME"
@@ -163,7 +164,7 @@ while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_su
echo "ERROR: duplicate third-party skill name: $name" >&2
exit 1
fi
if [ -d "codex/skills/thirdparty/$name" ] && tracked_skill_exists "$name"; then
if tracked_skill_exists "$name"; then
echo "ERROR: skill name conflict with tracked skill: $name" >&2
exit 1
fi
@@ -180,7 +181,7 @@ while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_su
echo "ERROR: duplicate third-party skill name: $name" >&2
exit 1
fi
if [ -d "codex/skills/thirdparty/$name" ] && tracked_skill_exists "$name"; then
if tracked_skill_exists "$name"; then
echo "ERROR: skill name conflict with tracked skill: $name" >&2
exit 1
fi