Compare commits
4 Commits
claude/rev
...
ci/add-mai
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49138541d0 | ||
|
|
7b9d8b3676 | ||
|
|
efd60947be | ||
|
|
2d7ece8a0e |
15
.github/workflows/cto-review.yml
vendored
15
.github/workflows/cto-review.yml
vendored
@@ -224,22 +224,25 @@ jobs:
|
|||||||
PY
|
PY
|
||||||
|
|
||||||
- name: Post PR review
|
- name: Post PR review
|
||||||
# Always posts as COMMENT — not APPROVE/REQUEST_CHANGES — because the default
|
|
||||||
# GITHUB_TOKEN is not permitted to formally approve PRs without toggling a
|
|
||||||
# repo setting. The verdict is still prominent in the first line of the body
|
|
||||||
# ("## CTO Review — APPROVE|REQUEST_CHANGES|COMMENT"). Human merges, so the
|
|
||||||
# GitHub-native review state isn't load-bearing.
|
|
||||||
if: steps.claude.outputs.skipped != '1'
|
if: steps.claude.outputs.skipped != '1'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
|
env:
|
||||||
|
VERDICT: ${{ steps.claude.outputs.verdict }}
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const body = fs.readFileSync('/tmp/review-body.md', 'utf8');
|
const body = fs.readFileSync('/tmp/review-body.md', 'utf8');
|
||||||
|
const verdict = process.env.VERDICT;
|
||||||
|
const eventMap = {
|
||||||
|
'APPROVE': 'APPROVE',
|
||||||
|
'REQUEST_CHANGES': 'REQUEST_CHANGES',
|
||||||
|
'COMMENT': 'COMMENT'
|
||||||
|
};
|
||||||
await github.rest.pulls.createReview({
|
await github.rest.pulls.createReview({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
pull_number: context.issue.number,
|
pull_number: context.issue.number,
|
||||||
event: 'COMMENT',
|
event: eventMap[verdict] || 'COMMENT',
|
||||||
body,
|
body,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/deploy.yml
vendored
7
.github/workflows/deploy.yml
vendored
@@ -45,12 +45,7 @@ jobs:
|
|||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
|
||||||
chmod 600 ~/.ssh/deploy_key
|
chmod 600 ~/.ssh/deploy_key
|
||||||
# Best-effort: keyscan stderr captured for diagnosis but never fatal.
|
ssh-keyscan -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
# We use StrictHostKeyChecking=no on the actual ssh/rsync calls anyway.
|
|
||||||
ssh-keyscan -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts 2>/tmp/keyscan.err || {
|
|
||||||
echo "::warning::ssh-keyscan failed (non-fatal). stderr:"
|
|
||||||
cat /tmp/keyscan.err || true
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: Deploy via rsync
|
- name: Deploy via rsync
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user