Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 607c9b82ea | |||
| 8acea007e7 | |||
| 953951145f | |||
| 1576e783fb | |||
| e017705c64 |
@@ -1 +0,0 @@
|
|||||||
[]
|
|
||||||
@@ -29,5 +29,4 @@
|
|||||||
|
|
||||||
每個階段都會加上明確的 log,並確保即使部分功能未完成也能降級執行、不會中斷 pipeline。
|
每個階段都會加上明確的 log,並確保即使部分功能未完成也能降級執行、不會中斷 pipeline。
|
||||||
|
|
||||||
每次執行後請貼 log,我會協助 debug。
|
每次執行後請貼 log,我會協助 debug。
|
||||||
|
|
||||||
+4
-3
@@ -41,14 +41,15 @@ export async function commitFile(filePath, content, message) {
|
|||||||
...(sha ? { sha } : {}),
|
...(sha ? { sha } : {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(` [debug] ${sha ? 'PUT' : 'POST'} ${url} branch=${PR_HEAD_BRANCH}`);
|
console.log(` [debug] ${sha ? 'PUT' : 'POST'} ${url} branch=${PR_HEAD_BRANCH} content_len=${encoded.length}`);
|
||||||
const resp = await axios.request({
|
const resp = await axios.request({
|
||||||
method: sha ? 'put' : 'post',
|
method: sha ? 'put' : 'post',
|
||||||
url,
|
url,
|
||||||
headers: headers(),
|
headers: { ...headers(), 'Content-Type': 'application/json' },
|
||||||
httpsAgent,
|
httpsAgent,
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
data: payload,
|
data: JSON.stringify(payload),
|
||||||
});
|
});
|
||||||
|
console.log(` [debug] response status=${resp.status}`);
|
||||||
return resp.data;
|
return resp.data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user