Declaring the variables username, password earlier and change the message to pass the host for the missing credentials

Signed-off-by: cmoulliard <cmoulliard@redhat.com>
This commit is contained in:
cmoulliard
2024-01-10 12:24:49 +01:00
parent 48ecd88b13
commit 8c9b90bb3e
@@ -304,9 +304,7 @@ export function createPublishGiteaAction(options: {
const { username, password } = integrationConfig.config;
if (!username || !password) {
throw new Error(
'Credentials for Gitea integration required for this action.',
);
throw new Error('Credentials for the gitea ${host} required.');
}
// check if the org exists within the gitea server