Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 121f66b0b3 | |||
| faa808bb5f | |||
| 07df3ef4a5 | |||
| fc537958ca |
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
+3
-1
@@ -10,6 +10,7 @@ export async function commitAndPush(workspace) {
|
|||||||
try {
|
try {
|
||||||
const fullPath = path.join(workspace, FINDINGS_PATH);
|
const fullPath = path.join(workspace, FINDINGS_PATH);
|
||||||
const content = fs.readFileSync(fullPath, 'utf8');
|
const content = fs.readFileSync(fullPath, 'utf8');
|
||||||
|
console.log(` [debug] FINDINGS_PATH=${FINDINGS_PATH} branch=${process.env.PR_HEAD_BRANCH} token=${process.env.GITEA_TOKEN ? '***' : 'EMPTY'}`);
|
||||||
const result = await commitFile(
|
const result = await commitFile(
|
||||||
FINDINGS_PATH,
|
FINDINGS_PATH,
|
||||||
content,
|
content,
|
||||||
@@ -18,6 +19,7 @@ export async function commitAndPush(workspace) {
|
|||||||
const commitHash = result.commit?.sha?.slice(0, 7) || 'unknown';
|
const commitHash = result.commit?.sha?.slice(0, 7) || 'unknown';
|
||||||
console.log(` ✅ persisted findings commit=${commitHash} push=${process.env.PR_HEAD_BRANCH}`);
|
console.log(` ✅ persisted findings commit=${commitHash} push=${process.env.PR_HEAD_BRANCH}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(` ⚠️ Runner failed: commit/push 失敗: ${e.message}`);
|
const detail = e.response?.data ? JSON.stringify(e.response.data) : e.message;
|
||||||
|
console.log(` ⚠️ Runner failed: commit/push 失敗: ${e.response?.status || ''} ${detail}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user