🔧 chore(ci): use ci-bot identity for superpowers sync commits
Update Third-party Superpowers / Update thirdparty/skill snapshot (push) Successful in 1m0s

This commit is contained in:
csh
2026-02-28 11:27:35 +08:00
parent fa247a7b31
commit f7f2c57c89
3 changed files with 17 additions and 4 deletions
+13
View File
@@ -5,6 +5,7 @@ ROOT = Path(__file__).resolve().parents[1]
SYNC_WORKFLOW = ROOT / ".gitea" / "workflows" / "sync-superpowers.yml"
AUTO_UPDATE_WORKFLOW = ROOT / ".gitea" / "workflows" / "update-thirdparty-superpowers.yml"
AUTO_UPDATE_SCRIPT = ROOT / ".gitea" / "ci" / "update_thirdparty_superpowers.sh"
SYNC_SCRIPT = ROOT / ".gitea" / "ci" / "sync_superpowers.sh"
class SuperpowersWorkflowTests(unittest.TestCase):
@@ -38,6 +39,18 @@ class SuperpowersWorkflowTests(unittest.TestCase):
self.assertIn("ls-remote", text)
self.assertIn('git checkout -B "$TARGET_BRANCH" "origin/$TARGET_BRANCH"', text)
def test_ci_scripts_use_ci_bot_identity(self):
sync_text = SYNC_SCRIPT.read_text(encoding="utf-8")
update_text = AUTO_UPDATE_SCRIPT.read_text(encoding="utf-8")
self.assertIn('COMMIT_AUTHOR_NAME="${COMMIT_AUTHOR_NAME:-ci-bot}"', sync_text)
self.assertIn('COMMIT_AUTHOR_EMAIL="${COMMIT_AUTHOR_EMAIL:-ci-bot@local}"', sync_text)
self.assertIn('COMMIT_AUTHOR_NAME="${COMMIT_AUTHOR_NAME:-ci-bot}"', update_text)
self.assertIn(
'COMMIT_AUTHOR_EMAIL="${COMMIT_AUTHOR_EMAIL:-ci-bot@local}"',
update_text,
)
if __name__ == "__main__":
unittest.main()