Skip to content

Commit

Permalink
update files pulled via gt
Browse files Browse the repository at this point in the history
  • Loading branch information
robstoll authored and github-actions[bot] committed Mar 11, 2024
1 parent 86b64f4 commit dc002e3
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Creative Commons Zero v1.0 Universal
# /___/ Please report bugs and contribute back your improvements
#
# Version: v2.1.1
# Version: v2.3.0
###################################

# https://editorconfig.org
Expand Down
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Creative Commons Zero v1.0 Universal
# /___/ Please report bugs and contribute back your improvements
#
# Version: v2.1.1
# Version: v2.3.0
###################################
-->
# Contributor Covenant Code of Conduct
Expand Down
2 changes: 1 addition & 1 deletion .github/Contributor Agreement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ which was based in turn on the Harmony contributor agreements harmonyagreements.
Thank you for your interest in contributing to
tegonal-scripts
currently developed on the platform
https://github.com/tegonal/tegonal-scripts
https://github.com/<OWNER_GITHUB>/<PROJECT_NAME_GITHUB>
and owned by
Tegonal Genossenschaft, Switzerland (the “Project Owner”, hereafter "We" or "Us").

Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Creative Commons Zero v1.0 Universal
# /___/ Please report bugs and contribute back your improvements
#
# Version: v2.1.1
# Version: v2.3.0
###################################
version: 2
updates:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Creative Commons Zero v1.0 Universal
# /___/ Please report bugs and contribute back your improvements
#
# Version: v2.1.1
# Version: v2.3.0
###################################
name: Cleanup

Expand All @@ -30,4 +30,4 @@ jobs:
body: Looks like someone forgot to run ./scripts/cleanup-on-push-to-main.sh before committing. I did it for them :)
delete-branch: true
token: ${{ secrets.AUTO_PR_TOKEN }}
push-to-fork: ${{ vars.AUTO_PR_FORK_NAME }}
push-to-fork: ${{ vars.AUTO_PR_FORK_NAME != '' && vars.AUTO_PR_FORK_NAME || secrets.AUTO_PR_FORK_NAME }}
45 changes: 27 additions & 18 deletions .gt/remotes/tegonal-gh-commons/lib/src/gt/pull-hook-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Creative Commons Zero v1.0 Universal
# /___/ Please report bugs and contribute back your improvements
#
# Version: v2.1.1
# Version: v2.3.0
####### Description #############
#
# functions which can be used to update the placeholders in the templates in a gt pull-hook.sh
Expand Down Expand Up @@ -53,51 +53,60 @@ fi

sourceOnce "$dir_of_tegonal_scripts/utility/parse-fn-args.sh"

function replaceTegonalGhCommonsPlaceholders(){
local source projectName version owner ownerEmail ownerGithubName projectNameGithub
function replaceTegonalGhCommonsPlaceholders() {
local source projectName version owner ownerEmail ownerGithub projectNameGithub
# shellcheck disable=SC2034 # is passed to parseFnArgs by name
local -ra params=(source projectName version owner ownerEmail ownerGithubName projectNameGithub)
local -ra params=(source projectName version owner ownerEmail ownerGithub projectNameGithub)
parseFnArgs params "$@"

if [[ $source =~ .*/\.github/CODE_OF_CONDUCT.md ]]; then
replacePlaceholdersCodeOfConduct "$source" "$ownerEmail"
replacePlaceholdersCodeOfConduct "$source" "$ownerEmail"
elif [[ $source =~ .*/\.github/Contributor[[:space:]]Agreement\.txt ]]; then
replacePlaceholdersContributorsAgreement "$source" "$projectName" "$owner"
replacePlaceholdersContributorsAgreement "$source" "$projectName" "$projectNameGithub" "$owner" "$ownerGithub"
elif [[ $source =~ .*/\.github/PULL_REQUEST_TEMPLATE.md ]]; then
local -r githubUrl="https://github.com/$ownerGithubName/$projectNameGithub"
local -r githubUrl="https://github.com/$ownerGithub/$projectNameGithub"
replacePlaceholdersPullRequestTemplate "$source" "$githubUrl" "$version"
fi
}

function replaceTegonalGhCommonsPlaceholders_Tegonal(){
function replaceTegonalGhCommonsPlaceholders_Tegonal() {
local source projectName version projectNameGithub
# shellcheck disable=SC2034 # is passed to parseFnArgs by name
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" "$projectNameGithub"
}

function replacePlaceholdersContributorsAgreement() {
if ! (($# == 3)); then
logError "you need to pass three arguments to replacePlaceholdersContributorsAgreement"
echo "1: file represents the 'Contributor Agreement.txt'"
echo "2: projectName the name of the project"
echo "3: owner owner of the project"
if ! (($# == 5)); then
logError "you need to pass 5 arguments to replacePlaceholdersContributorsAgreement"
echo "1: file represents the 'Contributor Agreement.txt'"
echo "2: projectName the name of the project"
echo "3: projectNameGithub the name of the project on GitHub"
echo "4: owner the owner of the project"
echo "5: ownerGithub the name of the organisation/owner on GitHub"
printStackTrace
exit 9
fi
local -r file=$1
local -r projectName=$2
local -r owner=$3
shift 3 || die "could not shift by 3"
PROJECT_NAME="$projectName" OWNER="$owner" perl -0777 -i \
local -r projectNameGithub=$3
local -r owner=$4
local -r ownerGithub=$5
shift 5 || die "could not shift by 5"
PROJECT_NAME="$projectName" \
PROJECT_NAME_GITHUB="$projectNameGithub" \
OWNER="$owner" \
OWNER_GITHUB="$ownerGithub" \
perl -0777 -i \
-pe 's/<PROJECT_NAME>/$ENV{PROJECT_NAME}/g;' \
-pe 's/<PROJECT_NAME_GITHUB>/$ENV{PROJECT_NAME_GITHUB}/g;' \
-pe 's/<OWNER>/$ENV{OWNER}/g;' \
-pe 's/<OWNER_GITHUB>/$ENV{OWNER_GITHUB}/g;' \
"$file"
}

Expand All @@ -120,7 +129,7 @@ function replacePlaceholdersPullRequestTemplate() {
"$file"
}

function replacePlaceholdersCodeOfConduct(){
function replacePlaceholdersCodeOfConduct() {
if ! (($# == 2)); then
logError "you need to pass two arguments to replacePlaceholdersCodeOfConductTemplate"
echo "1: file represents the 'CODE_OF_CONDUCT.md'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# / __/ -_) _ `/ _ \/ _ \/ _ `/ / Copyright 2022 Tegonal Genossenschaft <[email protected]>
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under European Union Public License 1.2
# /___/ Please report bugs and contribute back your improvements
# Version: v2.1.1
#
# Version: v2.3.0
####### Description #############
#
# constants intended to be sourced into a function.
Expand Down
22 changes: 11 additions & 11 deletions .gt/remotes/tegonal-gh-commons/pulled.tsv
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#@ Version: 1.0.0
tag file relativeTarget sha512
v2.1.1 src/.github/workflows/cleanup.yml ../.github/workflows/cleanup.yml 78d155430fced488506ab9207a728a2c269247d060ccb54e9505f721aac65e2612b1000dacd754fffe7e8e01be814ded3942e44727284aff76a5f549fe5ad26d
v2.1.1 src/.github/dependabot.yml ../.github/dependabot.yml 3d833307b03128d913255e92eddf97d7e3cdc6127ee170dbbd78a0bd1280ba8923f5c1f1560983d911178bb650d4e7d765d498bdf9581f973857c8c11666e232
v2.1.1 src/.github/CODE_OF_CONDUCT.md ../.github/CODE_OF_CONDUCT.md 4f072793ffe59b061319b4659248b974a1b03938ca1d73d3a9ddbe6820289848f7df2f08e6de566bc04d05876df97a99a364420af12528356e6529b44462e64b
v2.1.1 src/.github/PULL_REQUEST_TEMPLATE.md ../.github/PULL_REQUEST_TEMPLATE.md 9112d1ea1f72ea250cdfe686fc152e63f2e0cdcea9c46935289471d7a3f54c35af8a3f283570f5d863e936c7782939c7b1548cb7d4ccda712bbf9314926f58cb
v2.1.1 src/gt/pull-hook-functions.sh remotes/tegonal-gh-commons/lib/src/gt/pull-hook-functions.sh 934fa1421dfa2f7f267923801afa2330967099942786da38f504fff579d03938907932fa61d8c61c683e09278f7583257476ac573d833d5e15cea7a2a9dfc4f4
v2.1.1 src/.github/Contributor Agreement.txt ../.github/Contributor Agreement.txt 8ae9a779436b7e3c1bb1ebc3317b5d53fca85acfd53ecdb9c22c7bc3ed063f01f8dad2e8cfc5dfea0bde47d61c09e6323f4b1510c96a2bc8ffacf0b572b0e6ab
v2.1.1 src/gt/signing-key.public.asc signing-key.public.asc f60d6119f8083da722199a90ffb61273d404ba74dd01fe6712d1d1157dd0037e9618eb99f1d7f85450508d25f2ea33f869ee04ef11206c7e420f02b27738ae9b
v2.1.1 src/gt/signing-key.public.asc.actual_sig signing-key.public.asc.actual_sig e854eb98125782f99bab8cf3663392f9e24c8d3c90911e7688152b13550981c47d8e79efbb540521163abcb4c16e33c8e1270a424655057bd224bb9b4dff329d
v2.1.1 src/dotfiles/.editorconfig ../.editorconfig a1e9a814e40d6dd7a440b604ac1ef2a0e52d98fee545d27d31c98bdb15c615a15fc054d1ee74c7b6e2c3509a8d3212b9ad4ccc582ede62d30a9a220bd779ec17
v2.1.1 src/dotfiles/.shellcheckrc ../.shellcheckrc 1aa8f46f4f333f0b0789fe44dd43c5f257cec42a79d383744cbf511237ada077ee33210b19ce7e0c99895978b6b9a12498e1aca8ca2a3cca92aef9e4939d7aa4
v2.1.1 src/gt/tegonal.data.source.sh remotes/tegonal-gh-commons/lib/src/gt/tegonal.data.source.sh a629d768c8698e14d4e3dc16c783b555b6930883620d28e1c381b9ef02095a54baf9b2194ed9d3043f1ae806f722f11deb6d3a9f92ebd3ffb95ebe0f1aa139a2
v2.3.0 src/.github/workflows/cleanup.yml ../.github/workflows/cleanup.yml 352b094b1dff5e8ce2505219b9d482c498aba3ea5b79810cbb75e6e1ed7fec9c2a1ccef278403cb5cfd6559633e546f21b65019765e8692bc3bcefb841afd9b3
v2.3.0 src/.github/dependabot.yml ../.github/dependabot.yml dd21487a50bd4ce6393a548cb64b486ebc0c0b993b2ddc598a8b0c5c6fb4e547d058a5bc43da7dfdd737fdae70f3190e216605e7f3936625cc7bc5d1b354eeec
v2.3.0 src/.github/CODE_OF_CONDUCT.md ../.github/CODE_OF_CONDUCT.md a8a0f89d558850f94e5d62fece1276b453c14cc3a8d5434c49072ebd7c9be03abf4369cef7fd358a9b48e4df83c4d1e3637152769655ac4ac039b9dbbce90bad
v2.3.0 src/.github/PULL_REQUEST_TEMPLATE.md ../.github/PULL_REQUEST_TEMPLATE.md 9112d1ea1f72ea250cdfe686fc152e63f2e0cdcea9c46935289471d7a3f54c35af8a3f283570f5d863e936c7782939c7b1548cb7d4ccda712bbf9314926f58cb
v2.3.0 src/gt/pull-hook-functions.sh remotes/tegonal-gh-commons/lib/src/gt/pull-hook-functions.sh 42280cccfc2689f1ca71bb14a8c93a2c5acdad2416c6ac21f554934fed8e49c510851dee68daea7b16d4f9497082cdfc7a48262e1fa6432d504e3d28f787a01e
v2.3.0 src/.github/Contributor Agreement.txt ../.github/Contributor Agreement.txt 095b866d263924d4f04a21e82ddb760509cff2fc6052d3cdb33d0f68f60323f2a6100cc7ad4abc2a19903a0a261b9fd06fa0092b22d4fb1bcfb67659e230c91a
v2.3.0 src/gt/signing-key.public.asc signing-key.public.asc f60d6119f8083da722199a90ffb61273d404ba74dd01fe6712d1d1157dd0037e9618eb99f1d7f85450508d25f2ea33f869ee04ef11206c7e420f02b27738ae9b
v2.3.0 src/gt/signing-key.public.asc.actual_sig signing-key.public.asc.actual_sig e854eb98125782f99bab8cf3663392f9e24c8d3c90911e7688152b13550981c47d8e79efbb540521163abcb4c16e33c8e1270a424655057bd224bb9b4dff329d
v2.3.0 src/dotfiles/.editorconfig ../.editorconfig 5a76160d989cfb148e12f813bf0fd24f6cc40635a6ef8e9abb2fa80d9da6cf203bdee88f6920ad5617be3206b61c6bb167b74c5ea97fda22524d46905054d573
v2.3.0 src/dotfiles/.shellcheckrc ../.shellcheckrc 23badb8419334d27ecbc4cb13b72ed0e91a4f84b80c36d62dfe31dd791af3b4301e49a3366ed3da79d99a126136c048eb3e7188a7b2b663fc5f2fe73695c1bd7
v2.3.0 src/gt/tegonal.data.source.sh remotes/tegonal-gh-commons/lib/src/gt/tegonal.data.source.sh 957eb9616619624e7293a4b09b5743c6b570793368dcc144afb4dbd21bf91f7edc479ddd979bdabf43d3cb225b3c403cc56b9eaad0a3d7805c58e836a64e4296
2 changes: 1 addition & 1 deletion .shellcheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Creative Commons Zero v1.0 Universal
# /___/ Please report bugs and contribute back your improvements
#
# Version: v2.1.1
# Version: v2.3.0
###################################

# Prefer putting braces around variable references even when not strictly required.
Expand Down

0 comments on commit dc002e3

Please sign in to comment.