diff --git a/.github/workflows/qwen-autofix.yml b/.github/workflows/qwen-autofix.yml index e12100efd77..af533ed417e 100644 --- a/.github/workflows/qwen-autofix.yml +++ b/.github/workflows/qwen-autofix.yml @@ -1006,11 +1006,9 @@ jobs: GITHUB_TOKEN: '${{ secrets.CI_DEV_BOT_PAT }}' run: |- mkdir -p "${WORKDIR}" - if ! git diff --quiet || ! git diff --cached --quiet; then - echo 'Restoring tracked build output before switching to the PR branch.' - git status --short - git restore --source=HEAD --staged --worktree . - fi + echo 'Restoring tracked build output before switching to the PR branch.' + git status --short + git restore --source=HEAD --staged --worktree . git checkout -B "${BRANCH}" "origin/${BRANCH}" # Does the branch conflict with base? merge-tree computes the merge diff --git a/scripts/tests/qwen-autofix-workflow.test.js b/scripts/tests/qwen-autofix-workflow.test.js index 6cc9cacd1ab..3bcf01378ed 100644 --- a/scripts/tests/qwen-autofix-workflow.test.js +++ b/scripts/tests/qwen-autofix-workflow.test.js @@ -300,6 +300,7 @@ describe('qwen-autofix workflow', () => { ), ); expect(prepareBranchAndFeedbackStep).not.toContain('git clean'); + expect(prepareBranchAndFeedbackStep).not.toContain('git diff --quiet'); }); it('clears persistent autofix workdirs before agent steps run', () => {