diff --git a/deadlock-plugins/deadlock-extension/src/recorder/utils/gitea.ts b/deadlock-plugins/deadlock-extension/src/recorder/utils/gitea.ts index bc332c1eaa5f82e6d9784a6aca71aee7dbc54e1e..4f82b83369a791c67d7fc8313b8ce725569b9e01 100644 --- a/deadlock-plugins/deadlock-extension/src/recorder/utils/gitea.ts +++ b/deadlock-plugins/deadlock-extension/src/recorder/utils/gitea.ts @@ -23,10 +23,15 @@ export enum CommitFrom { } export async function commitAndPushOnQueue(gitMission: GitMission, from: CommitFrom) { - gitQueue.push(async () => { - if (from === CommitFrom.Auto) await commitAndPushCode(gitMission); - if (from === CommitFrom.Run) await mergeMaster(gitMission); - }); + if (from === CommitFrom.Run) { + gitQueue.push(async () => { + await mergeMaster(gitMission); + }); + } else if (gitQueue.length() == 0) { + gitQueue.push(async () => { + await commitAndPushCode(gitMission); + }); + } } async function commitAndPushCode(gitMission: GitMission) {