Skip to content
Snippets Groups Projects
Commit 5717a11c authored by Guillaume WEBER's avatar Guillaume WEBER Committed by Mohamed AZIKIOU
Browse files

fix: prevent submit commands to generate commit on main

parent 0eceb22f
No related branches found
No related tags found
1 merge request!36fix: prevent reviewer from pushing code or updating time spent
......@@ -9,6 +9,7 @@ import { queue } from 'async';
import { extensionWarn, recorderError as error, recorderLog as log } from './log';
import { clearFilesExceptGit, copyGitUserFiles } from './workdir';
import { copyFile } from 'fs/promises';
import UserMission from '../../core/mission/model/userMission';
const { readFile } = promises;
......@@ -17,6 +18,7 @@ const gitQueue = queue(async (task: CallableFunction) => {
}, 1);
export async function commitAndPushOnQueue(gitMission: GitMission, from: 'Run' | 'Auto' | 'HttpServer') {
if (!UserMission.getInstance().isReviewing()) {
if (from === 'Run') {
gitQueue.push(async () => {
await mergeMaster(gitMission);
......@@ -27,6 +29,7 @@ export async function commitAndPushOnQueue(gitMission: GitMission, from: 'Run' |
});
}
}
}
async function commitAndPushCode(gitMission: GitMission) {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment