From 9bdf6ac8071c6efd153f1f990816844a72596a23 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Thu, 7 Mar 2024 11:11:59 +0100 Subject: [PATCH] allow to have a separate github project name --- src/gt/pull-hook-functions.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gt/pull-hook-functions.sh b/src/gt/pull-hook-functions.sh index d18e49c..c1bd955 100644 --- a/src/gt/pull-hook-functions.sh +++ b/src/gt/pull-hook-functions.sh @@ -54,9 +54,9 @@ fi sourceOnce "$dir_of_tegonal_scripts/utility/parse-fn-args.sh" function replaceTegonalGhCommonsPlaceholders(){ - local source projectName version owner ownerEmail ownerGithubName + local source projectName version owner ownerEmail ownerGithubName projectNameGithub # shellcheck disable=SC2034 # is passed to parseFnArgs by name - local -ra params=(source projectName version owner ownerEmail ownerGithubName) + local -ra params=(source projectName version owner ownerEmail ownerGithubName projectNameGithub) parseFnArgs params "$@" if [[ $source =~ .*/\.github/CODE_OF_CONDUCT.md ]]; then @@ -64,22 +64,22 @@ function replaceTegonalGhCommonsPlaceholders(){ elif [[ $source =~ .*/\.github/Contributor[[:space:]]Agreement\.txt ]]; then replacePlaceholdersContributorsAgreement "$source" "$projectName" "$owner" elif [[ $source =~ .*/\.github/PULL_REQUEST_TEMPLATE.md ]]; then - local -r githubUrl="https://github.com/$ownerGithubName/$projectName" + local -r githubUrl="https://github.com/$ownerGithubName/$projectNameGithub" replacePlaceholdersPullRequestTemplate "$source" "$githubUrl" "$version" fi } function replaceTegonalGhCommonsPlaceholders_Tegonal(){ - local source projectName version + local source projectName version projectNameGithub # shellcheck disable=SC2034 # is passed to parseFnArgs by name - local -ra params=(source projectName version) + local -ra params=(source projectName version projectNameGithub) parseFnArgs params "$@" local tegonalFullName tegonalEmail tegonalGithubName source "$dir_of_github_commons/gt/tegonal.data.source.sh" || die "could not source tegonal.data.source.sh" - replaceTegonalGhCommonsPlaceholders "$source" "$projectName" "$version" "$tegonalFullName" "$tegonalEmail" "$tegonalGithubName" + replaceTegonalGhCommonsPlaceholders "$source" "$projectName" "$version" "$tegonalFullName" "$tegonalEmail" "$tegonalGithubName" "$projectNameGithub" } function replacePlaceholdersContributorsAgreement() {