From 0fbcab15411b344ac12c8967f7d3602bd8da7ffd Mon Sep 17 00:00:00 2001 From: Peter Macdonald Date: Wed, 16 Apr 2025 13:03:45 +0200 Subject: [PATCH] fix: error should be similar Signed-off-by: Peter Macdonald --- .../src/actions/gitlabRepoPush.test.ts | 4 ++-- .../src/actions/gitlabRepoPush.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabRepoPush.test.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabRepoPush.test.ts index 5644e0b952..35a0b83ae5 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabRepoPush.test.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabRepoPush.test.ts @@ -420,7 +420,7 @@ describe('createGitLabCommit', () => { ); await expect(instance.handler(ctx)).rejects.toThrow( - "Modifying the files in some-branch failed. Please verify that all files you're trying to modify exist in the repository. Error: Commit failed", + "Committing the changes to some-branch failed. Please verify that all files you're trying to modify exist in the repository. Error: Commit failed", ); }); @@ -443,7 +443,7 @@ describe('createGitLabCommit', () => { ); await expect(instance.handler(ctx)).rejects.toThrow( - "Modifying the files in some-branch failed. Please verify that all files you're trying to modify exist in the repository. Error: Commit failed", + "Committing the changes to some-branch failed. Please verify that all files you're trying to modify exist in the repository. Error: Commit failed", ); }); }); diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabRepoPush.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabRepoPush.ts index 8b6f5cca50..9ac1de13d3 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabRepoPush.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/gitlabRepoPush.ts @@ -205,7 +205,7 @@ export const createGitlabRepoPushAction = (options: { } catch (e) { if (commitAction !== 'create') { throw new InputError( - `Modifying the files in ${branchName} failed. Please verify that all files you're trying to modify exist in the repository. ${getErrorMessage( + `Committing the changes to ${branchName} failed. Please verify that all files you're trying to modify exist in the repository. ${getErrorMessage( e, )}`, );