fix(推送觸發 CI): 合併 push-token 進 token,findings 一律以 token 認證推送觸發 CI
- 移除 push-token input,token 兼作 Gitea API 認證與 findings 推送
- commitAndPushFindings 一律以 token 明確認證推送(不走 origin 自動 token);
只要 token 為能觸發 CI 的 PAT,結果 commit 即再觸發 PR 的 CI,避免新 head 缺檢查卡合併
- ci.yaml 三個 job 移除 push-token,保留 token: ${{ secrets.TOKEN }}
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
9e6e8bb793
commit
05178be520
+2
-2
@@ -90,7 +90,8 @@ function saveFindings({ cwd, ctx, tool, kept, excluded }) {
|
||||
* 依模式組出 filesToCommit(一般模式:findings 檔+有變更時的 exclusions.json;
|
||||
* 建問題模式:只有 exclusions.json)後呼叫本函式;另在步驟 4 判定無可審查變更且非建問題模式時,
|
||||
* 也會以 result: 'success' 提交空 findings。
|
||||
* 推送以 `ctx.pushToken`(PAT)優先,使結果 commit 再觸發 CI、由步驟 1 快速回報;
|
||||
* 推送一律以 `ctx.token` 的身分進行(不走 runner 的 origin 自動 token);只要 token 是能觸發 CI 的
|
||||
* PAT,結果 commit 就會再觸發 CI、由步驟 1 快速回報;
|
||||
* 注意 commit 訊息與模組常數 `BOT_COMMIT_PREFIX` 耦合,修改前綴會使步驟 1 的快速回報失效。
|
||||
*/
|
||||
function commitFindings({ cwd, ctx, files, result }) {
|
||||
@@ -101,7 +102,6 @@ function commitFindings({ cwd, ctx, files, result }) {
|
||||
message: `${BOT_COMMIT_PREFIX}[${result}]`,
|
||||
files,
|
||||
token: ctx.token,
|
||||
pushToken: ctx.pushToken,
|
||||
serverUrl: ctx.serverUrl,
|
||||
repository: ctx.repository,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user