@judge-java/cli 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
36
36
|
PR_NUMBER: ${{ github.event.issue.number }}
|
|
37
37
|
ACTOR: ${{ github.event.comment.user.login }}
|
|
38
|
-
|
|
38
|
+
COMMENT_ID: ${{ github.event.comment.id }}
|
|
39
39
|
run: node node_modules/@judge-java/github/dist/override.js
|
|
40
40
|
|
|
41
41
|
- name: Commit audit log
|
|
@@ -43,5 +43,18 @@ jobs:
|
|
|
43
43
|
git config user.name "judge-java[bot]"
|
|
44
44
|
git config user.email "judge-java[bot]@users.noreply.github.com"
|
|
45
45
|
git add .codeagent/audit.log
|
|
46
|
-
git diff --staged --quiet
|
|
47
|
-
|
|
46
|
+
if git diff --staged --quiet; then
|
|
47
|
+
echo "No audit entries to commit."
|
|
48
|
+
exit 0
|
|
49
|
+
fi
|
|
50
|
+
git commit -m "chore: log judge-java override [skip ci]"
|
|
51
|
+
# Retry loop: overrides on different PRs both push to the default
|
|
52
|
+
# branch's audit log and can race. Retrying the rebase-push handles
|
|
53
|
+
# the non-fast-forward rejection.
|
|
54
|
+
for attempt in 1 2 3; do
|
|
55
|
+
git pull --rebase --autostash && git push && exit 0
|
|
56
|
+
echo "Push failed (attempt $attempt/3), retrying..."
|
|
57
|
+
sleep 2
|
|
58
|
+
done
|
|
59
|
+
echo "Failed to push after 3 attempts"
|
|
60
|
+
exit 1
|