diff --git a/src/utils/workloadUtils.test.ts b/src/utils/workloadUtils.test.ts index d53a7479..438d3b03 100644 --- a/src/utils/workloadUtils.test.ts +++ b/src/utils/workloadUtils.test.ts @@ -411,8 +411,8 @@ describe('sparseCloneChart', () => { // Verify commit and push were called expect(mockGit.add).toHaveBeenCalledWith('.') expect(mockGit.commit).toHaveBeenCalledWith(`Add ${chartTargetDirName} helm chart`) - expect(mockGit.pull).toHaveBeenCalledWith('origin', 'main', { '--rebase': null }) - expect(mockGit.push).toHaveBeenCalledWith('origin', 'main') + expect(mockGit.pull).toHaveBeenCalledWith('origin', 'refs/heads/main', { '--rebase': null }) + expect(mockGit.push).toHaveBeenCalledWith('origin', 'refs/heads/main') }) test('handles Gitea URLs by encoding credentials', async () => { @@ -801,8 +801,8 @@ describe('chartRepo', () => { expect(mockGit.add).toHaveBeenCalledWith('.') expect(mockGit.commit).toHaveBeenCalledWith(`Add ${chartName} helm chart`) - expect(mockGit.pull).toHaveBeenCalledWith('origin', 'main', { '--rebase': null }) - expect(mockGit.push).toHaveBeenCalledWith('origin', 'main') + expect(mockGit.pull).toHaveBeenCalledWith('origin', 'refs/heads/main', { '--rebase': null }) + expect(mockGit.push).toHaveBeenCalledWith('origin', 'refs/heads/main') }) }) diff --git a/src/utils/workloadUtils.ts b/src/utils/workloadUtils.ts index 98c6332a..0cbce828 100644 --- a/src/utils/workloadUtils.ts +++ b/src/utils/workloadUtils.ts @@ -239,8 +239,8 @@ export class chartRepo { async commitAndPush(chartName: string) { await this.git.add('.') await this.git.commit(`Add ${chartName} helm chart`) - await this.git.pull('origin', 'main', { '--rebase': null }) - await this.git.push('origin', 'main') + await this.git.pull('origin', 'refs/heads/main', { '--rebase': null }) + await this.git.push('origin', 'refs/heads/main') } }