Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to have a separate github project name #73

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/gt/pull-hook-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,32 @@ 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
replacePlaceholdersCodeOfConduct "$source" "$ownerEmail"
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() {
Expand Down