From 9e04c209bc6f10fc1d97691192f0662c9490c732 Mon Sep 17 00:00:00 2001 From: kit Date: Mon, 3 Mar 2025 19:32:36 +0000 Subject: [PATCH] chore: install kit --- .../allow-anyone-to-self-assign-an-issue.yaml | 13 + .gitpod.yml | 23 ++ .kit/.gitattributes | 152 ++++++++ .../post-install-into-client.sh | 13 + ...onflicts-for-merge-conflict-practice.patch | 35 ++ .../post-commit-install-into-instance.sh | 5 + .../pre-install-into-instance.sh | 10 + ...ges-that-conflict-with-Round2-Issues.patch | 40 ++ .../post-commit-install-into-instance.sh | 5 + .../pre-install-into-instance.sh | 10 + .kit/5-add-vscode-devcontainer/.gitpod.yml | 23 ++ .../.gitpod/install-gitkit-client.sh | 17 + .../.vscode/settings.json | 3 + .../install-into-instance.sh | 11 + .../allow-anyone-to-self-assign-an-issue.yaml | 13 + .../install-into-instance.sh | 12 + .../install-into-client.sh | 6 + .../install-into-instance.sh | 50 +++ .../post-install-into-client.sh | 91 +++++ .../upstream-location.sh | 11 + .../install-into-instance.sh | 5 + .../prevent-clone-inside-another-repo.sh | 23 ++ .../install-into-client.sh | 10 + .../prevent-commit-to-main.sh | 28 ++ .../install-into-instance.sh | 8 + .../prevent-merge-into-self.sh | 20 + .../install-into-client.sh | 10 + .../prevent-merge-to-main.sh | 21 ++ .../install-into-instance.sh | 8 + ...t-pull-from-upstream-main-into-non-main.sh | 23 ++ .kit/5-prevent-rebase/install-into-client.sh | 10 + .kit/5-prevent-rebase/prevent-rebase.sh | 12 + .../install-into-instance.sh | 8 + .../prevent-remote-to-non-upstream.sh | 72 ++++ .kit/6-create-labels/labels.json | 67 ++++ .../post-push-install-into-instance.sh | 22 ++ .kit/7-create-issues/issues.json | 356 ++++++++++++++++++ .../post-push-install-into-instance.sh | 32 ++ .kit/8-git-shim/install-into-client.sh | 35 ++ .kit/8-git-shim/install-into-instance.sh | 8 + .../8-git-shim/install-into-shell_template.sh | 24 ++ .kit/8-git-shim/sub-shims/.gitattributes | 1 + .kit/features/.gitattributes | 152 ++++++++ .../post-install-into-client.sh | 13 + ...onflicts-for-merge-conflict-practice.patch | 35 ++ .../post-commit-install-into-instance.sh | 5 + .../pre-install-into-instance.sh | 10 + ...ges-that-conflict-with-Round2-Issues.patch | 40 ++ .../post-commit-install-into-instance.sh | 5 + .../pre-install-into-instance.sh | 10 + .../5-add-vscode-devcontainer/.gitpod.yml | 23 ++ .../.gitpod/install-gitkit-client.sh | 17 + .../.vscode/settings.json | 3 + .../install-into-instance.sh | 11 + .../allow-anyone-to-self-assign-an-issue.yaml | 13 + .../install-into-instance.sh | 12 + .../install-into-client.sh | 6 + .../install-into-instance.sh | 50 +++ .../post-install-into-client.sh | 91 +++++ .../upstream-location.sh | 11 + .../upstream-location.txt | 1 + .../install-into-instance.sh | 5 + .../prevent-clone-inside-another-repo.sh | 23 ++ .../install-into-client.sh | 10 + .../prevent-commit-to-main.sh | 28 ++ .../install-into-instance.sh | 8 + .../prevent-merge-into-self.sh | 20 + .../install-into-client.sh | 10 + .../prevent-merge-to-main.sh | 21 ++ .../install-into-instance.sh | 8 + ...t-pull-from-upstream-main-into-non-main.sh | 23 ++ .../5-prevent-rebase/install-into-client.sh | 10 + .../5-prevent-rebase/prevent-rebase.sh | 12 + .../install-into-instance.sh | 8 + .../prevent-remote-to-non-upstream.sh | 72 ++++ .kit/features/6-create-labels/labels.json | 67 ++++ .../post-push-install-into-instance.sh | 22 ++ .kit/features/7-create-issues/issues.json | 356 ++++++++++++++++++ .../post-push-install-into-instance.sh | 32 ++ .../8-git-shim/install-into-client.sh | 35 ++ .../8-git-shim/install-into-instance.sh | 8 + .../8-git-shim/install-into-shell_template.sh | 24 ++ .../8-git-shim/sub-shims/.gitattributes | 1 + .kit/features/8-git-shim/sub-shims/pre-clone | 23 ++ .kit/features/8-git-shim/sub-shims/pre-merge | 20 + .kit/features/8-git-shim/sub-shims/pre-pull | 23 ++ .kit/features/8-git-shim/sub-shims/pre-remote | 72 ++++ .../install-features-into-client/run.sh | 34 ++ .kit/install-features-into-client/run.sh | 34 ++ .vscode/settings.json | 3 + 90 files changed, 2866 insertions(+) create mode 100644 .github/workflows/allow-anyone-to-self-assign-an-issue.yaml create mode 100644 .gitpod.yml create mode 100644 .kit/.gitattributes create mode 100755 .kit/0-display-welcome-message/post-install-into-client.sh create mode 100644 .kit/5-add-conflicts-for-merge-conflict-practice/0001-Conflicts-for-merge-conflict-practice.patch create mode 100755 .kit/5-add-conflicts-for-merge-conflict-practice/post-commit-install-into-instance.sh create mode 100755 .kit/5-add-conflicts-for-merge-conflict-practice/pre-install-into-instance.sh create mode 100644 .kit/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch create mode 100755 .kit/5-add-round-two-conflicts/post-commit-install-into-instance.sh create mode 100755 .kit/5-add-round-two-conflicts/pre-install-into-instance.sh create mode 100644 .kit/5-add-vscode-devcontainer/.gitpod.yml create mode 100755 .kit/5-add-vscode-devcontainer/.gitpod/install-gitkit-client.sh create mode 100644 .kit/5-add-vscode-devcontainer/.vscode/settings.json create mode 100755 .kit/5-add-vscode-devcontainer/install-into-instance.sh create mode 100644 .kit/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml create mode 100755 .kit/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh create mode 100755 .kit/5-allow-only-fast-foward-merges-on-main/install-into-client.sh create mode 100755 .kit/5-detect-upstream-clone/install-into-instance.sh create mode 100755 .kit/5-detect-upstream-clone/post-install-into-client.sh create mode 100755 .kit/5-detect-upstream-clone/upstream-location.sh create mode 100755 .kit/5-prevent-clone-inside-another-repo/install-into-instance.sh create mode 100755 .kit/5-prevent-clone-inside-another-repo/prevent-clone-inside-another-repo.sh create mode 100755 .kit/5-prevent-commit-to-main/install-into-client.sh create mode 100755 .kit/5-prevent-commit-to-main/prevent-commit-to-main.sh create mode 100755 .kit/5-prevent-merge-into-self/install-into-instance.sh create mode 100755 .kit/5-prevent-merge-into-self/prevent-merge-into-self.sh create mode 100755 .kit/5-prevent-merge-to-main/install-into-client.sh create mode 100755 .kit/5-prevent-merge-to-main/prevent-merge-to-main.sh create mode 100755 .kit/5-prevent-pull-from-upstream-main-into-non-main/install-into-instance.sh create mode 100755 .kit/5-prevent-pull-from-upstream-main-into-non-main/prevent-pull-from-upstream-main-into-non-main.sh create mode 100755 .kit/5-prevent-rebase/install-into-client.sh create mode 100755 .kit/5-prevent-rebase/prevent-rebase.sh create mode 100755 .kit/5-prevent-remote-to-non-upstream/install-into-instance.sh create mode 100755 .kit/5-prevent-remote-to-non-upstream/prevent-remote-to-non-upstream.sh create mode 100644 .kit/6-create-labels/labels.json create mode 100755 .kit/6-create-labels/post-push-install-into-instance.sh create mode 100644 .kit/7-create-issues/issues.json create mode 100755 .kit/7-create-issues/post-push-install-into-instance.sh create mode 100755 .kit/8-git-shim/install-into-client.sh create mode 100755 .kit/8-git-shim/install-into-instance.sh create mode 100755 .kit/8-git-shim/install-into-shell_template.sh create mode 100644 .kit/8-git-shim/sub-shims/.gitattributes create mode 100644 .kit/features/.gitattributes create mode 100755 .kit/features/0-display-welcome-message/post-install-into-client.sh create mode 100644 .kit/features/5-add-conflicts-for-merge-conflict-practice/0001-Conflicts-for-merge-conflict-practice.patch create mode 100755 .kit/features/5-add-conflicts-for-merge-conflict-practice/post-commit-install-into-instance.sh create mode 100755 .kit/features/5-add-conflicts-for-merge-conflict-practice/pre-install-into-instance.sh create mode 100644 .kit/features/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch create mode 100755 .kit/features/5-add-round-two-conflicts/post-commit-install-into-instance.sh create mode 100755 .kit/features/5-add-round-two-conflicts/pre-install-into-instance.sh create mode 100644 .kit/features/5-add-vscode-devcontainer/.gitpod.yml create mode 100755 .kit/features/5-add-vscode-devcontainer/.gitpod/install-gitkit-client.sh create mode 100644 .kit/features/5-add-vscode-devcontainer/.vscode/settings.json create mode 100755 .kit/features/5-add-vscode-devcontainer/install-into-instance.sh create mode 100644 .kit/features/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml create mode 100755 .kit/features/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh create mode 100755 .kit/features/5-allow-only-fast-foward-merges-on-main/install-into-client.sh create mode 100755 .kit/features/5-detect-upstream-clone/install-into-instance.sh create mode 100755 .kit/features/5-detect-upstream-clone/post-install-into-client.sh create mode 100755 .kit/features/5-detect-upstream-clone/upstream-location.sh create mode 100644 .kit/features/5-detect-upstream-clone/upstream-location.txt create mode 100755 .kit/features/5-prevent-clone-inside-another-repo/install-into-instance.sh create mode 100755 .kit/features/5-prevent-clone-inside-another-repo/prevent-clone-inside-another-repo.sh create mode 100755 .kit/features/5-prevent-commit-to-main/install-into-client.sh create mode 100755 .kit/features/5-prevent-commit-to-main/prevent-commit-to-main.sh create mode 100755 .kit/features/5-prevent-merge-into-self/install-into-instance.sh create mode 100755 .kit/features/5-prevent-merge-into-self/prevent-merge-into-self.sh create mode 100755 .kit/features/5-prevent-merge-to-main/install-into-client.sh create mode 100755 .kit/features/5-prevent-merge-to-main/prevent-merge-to-main.sh create mode 100755 .kit/features/5-prevent-pull-from-upstream-main-into-non-main/install-into-instance.sh create mode 100755 .kit/features/5-prevent-pull-from-upstream-main-into-non-main/prevent-pull-from-upstream-main-into-non-main.sh create mode 100755 .kit/features/5-prevent-rebase/install-into-client.sh create mode 100755 .kit/features/5-prevent-rebase/prevent-rebase.sh create mode 100755 .kit/features/5-prevent-remote-to-non-upstream/install-into-instance.sh create mode 100755 .kit/features/5-prevent-remote-to-non-upstream/prevent-remote-to-non-upstream.sh create mode 100644 .kit/features/6-create-labels/labels.json create mode 100755 .kit/features/6-create-labels/post-push-install-into-instance.sh create mode 100644 .kit/features/7-create-issues/issues.json create mode 100755 .kit/features/7-create-issues/post-push-install-into-instance.sh create mode 100755 .kit/features/8-git-shim/install-into-client.sh create mode 100755 .kit/features/8-git-shim/install-into-instance.sh create mode 100755 .kit/features/8-git-shim/install-into-shell_template.sh create mode 100644 .kit/features/8-git-shim/sub-shims/.gitattributes create mode 100755 .kit/features/8-git-shim/sub-shims/pre-clone create mode 100755 .kit/features/8-git-shim/sub-shims/pre-merge create mode 100755 .kit/features/8-git-shim/sub-shims/pre-pull create mode 100755 .kit/features/8-git-shim/sub-shims/pre-remote create mode 100755 .kit/features/install-features-into-client/run.sh create mode 100755 .kit/install-features-into-client/run.sh create mode 100644 .vscode/settings.json diff --git a/.github/workflows/allow-anyone-to-self-assign-an-issue.yaml b/.github/workflows/allow-anyone-to-self-assign-an-issue.yaml new file mode 100644 index 0000000..cbc97d2 --- /dev/null +++ b/.github/workflows/allow-anyone-to-self-assign-an-issue.yaml @@ -0,0 +1,13 @@ +name: "Allow anyone to self-assign an issue" + +on: [issue_comment] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: bhermann/issue-volunteer@v0.1.12 + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..15d091f --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,23 @@ +# Image of workspace. Learn more: https://www.gitpod.io/docs/configure/workspaces/workspace-image +image: gitpod/workspace-full:latest + +tasks: + - name: Install KitClient (for VSCode Dev Container in GitPod) + command: | + mkdir -p /home/gitpod/.kitclient + git clone https://gitlab.com/hfossedu/kits/KitClient.git /home/gitpod/.local/lib/kitclient + chmod +x /home/gitpod/.local/lib/kitclient/src/install-kit-features-into-client.sh + sudo ln -s /home/gitpod/.local/lib/kitclient/src/install-kit-features-into-client.sh /usr/share/git-core/templates/hooks/post-checkout + cat /home/gitpod/.local/lib/kitclient/src/bashrc.additions >> /home/gitpod/.bashrc + mkdir -p "$HOME/.kitclient" + git config --global user.name > "$HOME/.kitclient/kituser.txt" + git config --global --add safe.directory "${PROJ_ROOT}" + git config --global pull.ff only + # git config --global credential.helper store + git config --global init.defaultBranch main + git config --global merge.conflictstyle diff3 + git config --global merge.tool vscode + git config --global mergetool.keepbackup false + git config --global mergetool.vscode.cmd 'code --wait $MERGED' + "${GITPOD_REPO_ROOT}/.kit/install-features-into-client/run.sh" + exec bash diff --git a/.kit/.gitattributes b/.kit/.gitattributes new file mode 100644 index 0000000..405f85c --- /dev/null +++ b/.kit/.gitattributes @@ -0,0 +1,152 @@ +# Common settings that generally should always be used with your language specific settings + +# Auto detect text files and perform LF normalization +* text=auto + +# +# The above will handle all files NOT found below +# + +# Documents +*.bibtex text diff=bibtex +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.md text diff=markdown +*.mdx text diff=markdown +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +*.sql text +*.epub diff=astextplain + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as text by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.eps binary + +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.sh text eol=lf +*.zsh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# Serialisation +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# Archives +*.7z binary +*.gz binary +*.tar binary +*.tgz binary +*.zip binary + +# Text files where line endings should be preserved +*.patch -text + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore +.gitkeep export-ignore + +# Apply override to all files in the directory +*.md linguist-detectable + +# Basic .gitattributes for a Vim repo. +# Vim on Linux works with LF only, Vim on Windows works with both LF and CRLF + +# Source files +# ============ +*.vim text eol=lf +.vimrc text eol=lf +.gvimrc text eol=lf + +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +# * text=auto + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just comment the entries below and +# uncomment the group further below +############################################################################### + +*.sln text eol=crlf +*.csproj text eol=crlf +*.vbproj text eol=crlf +*.vcxproj text eol=crlf +*.vcproj text eol=crlf +*.dbproj text eol=crlf +*.fsproj text eol=crlf +*.lsproj text eol=crlf +*.wixproj text eol=crlf +*.modelproj text eol=crlf +*.sqlproj text eol=crlf +*.wwaproj text eol=crlf + +*.xproj text eol=crlf +*.props text eol=crlf +*.filters text eol=crlf +*.vcxitems text eol=crlf + + +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +#*.xproj merge=binary +#*.props merge=binary +#*.filters merge=binary +#*.vcxitems merge=binary + +# gold.raw contains text, but we don't want eol conversions +*.raw binary diff --git a/.kit/0-display-welcome-message/post-install-into-client.sh b/.kit/0-display-welcome-message/post-install-into-client.sh new file mode 100755 index 0000000..80d9a47 --- /dev/null +++ b/.kit/0-display-welcome-message/post-install-into-client.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +echo "*********************************************************************" +printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" +echo +echo "I am your personal virtual assistant, and I am here to help you be" +echo "successful in the GitKit activities. You will hear from me every" +echo "once in a while when I think you might need some help." +echo +echo "(About my name:" +printf "I'm in the 'kit' and communicate through your 'tty' - get it? \xF0\x9F\x98\x81\n" +printf "Curious about the tty? See https://itsfoss.com/what-is-tty-in-linux/)\n" +echo "*********************************************************************" diff --git a/.kit/5-add-conflicts-for-merge-conflict-practice/0001-Conflicts-for-merge-conflict-practice.patch b/.kit/5-add-conflicts-for-merge-conflict-practice/0001-Conflicts-for-merge-conflict-practice.patch new file mode 100644 index 0000000..5550193 --- /dev/null +++ b/.kit/5-add-conflicts-for-merge-conflict-practice/0001-Conflicts-for-merge-conflict-practice.patch @@ -0,0 +1,35 @@ +From d008b798254a94457d7937dccd05e30ca1351ff8 Mon Sep 17 00:00:00 2001 +From: Grant Braught +Date: Fri, 12 Nov 2021 08:43:21 -0500 +Subject: [PATCH] Conflicts for practicing merges with conflicts + +Students can pull this branch and used it to practice resolving merge conflicts. It contains two merge conflicts with the 4 changes made in the addConflicts branch. +--- + README.md | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/README.md b/README.md +index 9d26f8e..26c2c3a 100644 +--- a/README.md ++++ b/README.md +@@ -22,7 +22,7 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic + + ### History ### + +-FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the Dickinson College Farm. The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. ++FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://a.different.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. + + ### Acknowledgements ### + +@@ -31,7 +31,7 @@ FarmData2 is powered by the farmOS open source project. + Support and assistance with FarmData2 development has been received from [The Non-Profit FOSS Institute](https://npfi.org/). + + The development of FarmData2 has received partial support from: +-* The GNOME Community Engagement Challenge: ++* The [GNOME Community Engagement Challenge](https://a.different.link3): + * [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png) + * The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. + * [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general). +-- +2.36.0 + diff --git a/.kit/5-add-conflicts-for-merge-conflict-practice/post-commit-install-into-instance.sh b/.kit/5-add-conflicts-for-merge-conflict-practice/post-commit-install-into-instance.sh new file mode 100755 index 0000000..c273b45 --- /dev/null +++ b/.kit/5-add-conflicts-for-merge-conflict-practice/post-commit-install-into-instance.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +git switch merge-conflict-practice +git rebase main +git switch main diff --git a/.kit/5-add-conflicts-for-merge-conflict-practice/pre-install-into-instance.sh b/.kit/5-add-conflicts-for-merge-conflict-practice/pre-install-into-instance.sh new file mode 100755 index 0000000..8cc6302 --- /dev/null +++ b/.kit/5-add-conflicts-for-merge-conflict-practice/pre-install-into-instance.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +cd "${REPO_DIR}" || exit 1 + +git switch main +git switch -c merge-conflict-practice +git am "${SCRIPT_DIR}"/*.patch || (echo "WARNING: could not apply patch" && git am --abort) +git switch main diff --git a/.kit/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch b/.kit/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch new file mode 100644 index 0000000..3ba5969 --- /dev/null +++ b/.kit/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch @@ -0,0 +1,40 @@ +From 8d03822daf8d30fc192b4543d7992ee0b0ea099e Mon Sep 17 00:00:00 2001 +From: Grant Braught +Date: Fri, 12 Nov 2021 08:37:19 -0500 +Subject: [PATCH] Changes that conflict with Round2 Issues. + +Each of the 190-Round2 issues in the issue tracker add links to the README.md file. This commit, when merged into main will introduce changes that conflict with all of the changes requested by those issues. It should be merged after students synch with main and as or just after they submit their PR's for the 190-Round2 issues. +--- + README.md | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/README.md b/README.md +index 9d26f8e..efb70b6 100644 +--- a/README.md ++++ b/README.md +@@ -22,18 +22,18 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic + + ### History ### + +-FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the Dickinson College Farm. The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. ++FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://not.the.right.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. + + ### Acknowledgements ### + +-FarmData2 is powered by the farmOS open source project. ++FarmData2 is powered by the [farmOS](https://not.the.right.link2) open source project. + + Support and assistance with FarmData2 development has been received from [The Non-Profit FOSS Institute](https://npfi.org/). + + The development of FarmData2 has received partial support from: +-* The GNOME Community Engagement Challenge: ++* The [GNOME Community Engagement Challenge](https://not.the.right.link3): + * [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png) +-* The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. ++* The National Science Foundation ([DUE-2013069](https://not.the.right.link4)) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. + * [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general). + + --- +-- +2.36.0 + diff --git a/.kit/5-add-round-two-conflicts/post-commit-install-into-instance.sh b/.kit/5-add-round-two-conflicts/post-commit-install-into-instance.sh new file mode 100755 index 0000000..f8fa632 --- /dev/null +++ b/.kit/5-add-round-two-conflicts/post-commit-install-into-instance.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +git switch add-round-two-conflicts +git rebase main +git switch main diff --git a/.kit/5-add-round-two-conflicts/pre-install-into-instance.sh b/.kit/5-add-round-two-conflicts/pre-install-into-instance.sh new file mode 100755 index 0000000..13e29ce --- /dev/null +++ b/.kit/5-add-round-two-conflicts/pre-install-into-instance.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +cd "${REPO_DIR}" || exit 1 + +git switch main +git switch -c add-round-two-conflicts +git am "${SCRIPT_DIR}"/*.patch || (echo "WARNING: could not apply patch" && git am --abort) +git switch main diff --git a/.kit/5-add-vscode-devcontainer/.gitpod.yml b/.kit/5-add-vscode-devcontainer/.gitpod.yml new file mode 100644 index 0000000..15d091f --- /dev/null +++ b/.kit/5-add-vscode-devcontainer/.gitpod.yml @@ -0,0 +1,23 @@ +# Image of workspace. Learn more: https://www.gitpod.io/docs/configure/workspaces/workspace-image +image: gitpod/workspace-full:latest + +tasks: + - name: Install KitClient (for VSCode Dev Container in GitPod) + command: | + mkdir -p /home/gitpod/.kitclient + git clone https://gitlab.com/hfossedu/kits/KitClient.git /home/gitpod/.local/lib/kitclient + chmod +x /home/gitpod/.local/lib/kitclient/src/install-kit-features-into-client.sh + sudo ln -s /home/gitpod/.local/lib/kitclient/src/install-kit-features-into-client.sh /usr/share/git-core/templates/hooks/post-checkout + cat /home/gitpod/.local/lib/kitclient/src/bashrc.additions >> /home/gitpod/.bashrc + mkdir -p "$HOME/.kitclient" + git config --global user.name > "$HOME/.kitclient/kituser.txt" + git config --global --add safe.directory "${PROJ_ROOT}" + git config --global pull.ff only + # git config --global credential.helper store + git config --global init.defaultBranch main + git config --global merge.conflictstyle diff3 + git config --global merge.tool vscode + git config --global mergetool.keepbackup false + git config --global mergetool.vscode.cmd 'code --wait $MERGED' + "${GITPOD_REPO_ROOT}/.kit/install-features-into-client/run.sh" + exec bash diff --git a/.kit/5-add-vscode-devcontainer/.gitpod/install-gitkit-client.sh b/.kit/5-add-vscode-devcontainer/.gitpod/install-gitkit-client.sh new file mode 100755 index 0000000..222a94c --- /dev/null +++ b/.kit/5-add-vscode-devcontainer/.gitpod/install-gitkit-client.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +PROJ_ROOT= +PROJ_ROOT="${1}" + +git config --global --add safe.directory "${PROJ_ROOT}" +git config --global pull.ff only +git config --global credential.helper store +git config --global init.defaultBranch main +git config --global merge.conflictstyle diff3 +git config --global merge.tool vscode +git config --global mergetool.keepbackup false +git config --global mergetool.vscode.cmd 'code --wait $MERGED' + +cat "${PROJ_ROOT}/.gitpod/bashrc-additions.sh" >> "${HOME}/.bashrc" + +"${PROJ_ROOT}/.kit/install-features-into-client/run.sh" diff --git a/.kit/5-add-vscode-devcontainer/.vscode/settings.json b/.kit/5-add-vscode-devcontainer/.vscode/settings.json new file mode 100644 index 0000000..4e8191a --- /dev/null +++ b/.kit/5-add-vscode-devcontainer/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.mergeEditor": true +} \ No newline at end of file diff --git a/.kit/5-add-vscode-devcontainer/install-into-instance.sh b/.kit/5-add-vscode-devcontainer/install-into-instance.sh new file mode 100755 index 0000000..b1b63d2 --- /dev/null +++ b/.kit/5-add-vscode-devcontainer/install-into-instance.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +set -e + +cp "$SCRIPT_DIR/.gitpod.yml" "$REPO_DIR" +cp -r "$SCRIPT_DIR/.vscode" "$REPO_DIR" diff --git a/.kit/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml b/.kit/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml new file mode 100644 index 0000000..cbc97d2 --- /dev/null +++ b/.kit/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml @@ -0,0 +1,13 @@ +name: "Allow anyone to self-assign an issue" + +on: [issue_comment] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: bhermann/issue-volunteer@v0.1.12 + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.kit/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh b/.kit/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh new file mode 100755 index 0000000..afc08f2 --- /dev/null +++ b/.kit/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +set -e + +workflows_dir="${REPO_DIR}/.github/workflows" +mkdir -p "$workflows_dir" +cp "$SCRIPT_DIR/allow-anyone-to-self-assign-an-issue.yaml" "$workflows_dir" diff --git a/.kit/5-allow-only-fast-foward-merges-on-main/install-into-client.sh b/.kit/5-allow-only-fast-foward-merges-on-main/install-into-client.sh new file mode 100755 index 0000000..dabd8d2 --- /dev/null +++ b/.kit/5-allow-only-fast-foward-merges-on-main/install-into-client.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +git config --local branch.main.mergeoptions "--no-ff" diff --git a/.kit/5-detect-upstream-clone/install-into-instance.sh b/.kit/5-detect-upstream-clone/install-into-instance.sh new file mode 100755 index 0000000..bfe5e93 --- /dev/null +++ b/.kit/5-detect-upstream-clone/install-into-instance.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +source "${SCRIPT_DIR}/upstream-location.sh" + +function main() { + save-upstream-location "$(get-upstream-location)" +} + +function get-upstream-location() { + get-origin-location +} + +function get-origin-location() { + convert-url-to-org-repo "$(get-origin-url)" +} + +function get-origin-url() { + git remote get-url origin +} + +function convert-url-to-org-repo() { + local n="$1" + if [[ "$n" =~ ^git.* ]] ; then + # remove git@github.com prefix + n="${n#git@github.com:}" + else + # remove https://github.com/ prefix + n="${n#https://*github.com/}" + fi + # remove .git suffix + n="${n%.git}" + echo "$n" +} + +function get-upstream-location-file() { + echo "$SCRIPT_DIR/upstream-location.txt" +} + +function commit-and-push-upstream-location() { + git add "$(get-upstream-location-file)" + git commit -m "build(kit): add upstream location" + git push +} + +main diff --git a/.kit/5-detect-upstream-clone/post-install-into-client.sh b/.kit/5-detect-upstream-clone/post-install-into-client.sh new file mode 100755 index 0000000..1fd00d8 --- /dev/null +++ b/.kit/5-detect-upstream-clone/post-install-into-client.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +# shellcheck disable=SC1091 +source "${SCRIPT_DIR}/upstream-location.sh" + +function main() { + detect-upstream-clone +} + +function detect-upstream-clone() { + upstream="$(load-upstream-location)" + origin="$(get-origin-location)" + + # Case insensitive check. + upstream="$(echo "$upstream" | tr '[:upper:]' '[:lower:]')" + origin="$(echo "$origin" | tr '[:upper:]' '[:lower:]')" + if [[ "$origin" == "$upstream" ]] ; then + display-error-message + fi +} + +function get-origin-location() { + convert-url-to-org-repo "$(get-origin-url)" +} + +function get-origin-url() { + git remote get-url origin +} + +function convert-url-to-org-repo() { + url="$1" + if [[ "$url" =~ ^git.* ]] ; then + convert-git-url-to-org-repo "$url" + else + convert-http-url-to-org-repo "$url" + fi +} + +function convert-git-url-to-org-repo() { + url="$1" + url="$(remove-prefix-to-first-colon "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function convert-http-url-to-org-repo() { + url="$1" + url="$(remove-prefix-http "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function remove-prefix-to-first-colon() { + echo "${1#*:}" +} + +function remove-suffix-dot-git() { + echo "${1%.git}" +} + +function remove-prefix-http() { + local url="${1}" + url="${url#*//}" + echo "${url#*/}" +} + +function display-error-message() { + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "Oops, I think you have cloned the upstream repository instead of your" + echo "fork. But don't worry. You can fix it!" + echo + echo "1. Use a browser to navigate to your fork and copy its URL." + echo "2. In this terminal, return to the parent directory," + echo " delete the current clone, and clone the fork as follows:" + echo + echo " cd .." + echo " rm -rf $(pwd)" + echo " git clone [PASTE_FORK_URL]" + echo + echo "3. Click reload in your browser to reload your development environment." + echo "*********************************************************************" +} + +main diff --git a/.kit/5-detect-upstream-clone/upstream-location.sh b/.kit/5-detect-upstream-clone/upstream-location.sh new file mode 100755 index 0000000..df7f2b1 --- /dev/null +++ b/.kit/5-detect-upstream-clone/upstream-location.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +UPSTREAM_LOCATION_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +save-upstream-location() { + echo "${1}" > "${UPSTREAM_LOCATION_DIR}/upstream-location.txt" +} + +load-upstream-location() { + cat "${UPSTREAM_LOCATION_DIR}/upstream-location.txt" +} diff --git a/.kit/5-prevent-clone-inside-another-repo/install-into-instance.sh b/.kit/5-prevent-clone-inside-another-repo/install-into-instance.sh new file mode 100755 index 0000000..01b4a4b --- /dev/null +++ b/.kit/5-prevent-clone-inside-another-repo/install-into-instance.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +cat "$SCRIPT_DIR/prevent-clone-inside-another-repo.sh" >> "$SCRIPT_DIR/../8-git-shim/sub-shims/pre-clone" diff --git a/.kit/5-prevent-clone-inside-another-repo/prevent-clone-inside-another-repo.sh b/.kit/5-prevent-clone-inside-another-repo/prevent-clone-inside-another-repo.sh new file mode 100755 index 0000000..807b439 --- /dev/null +++ b/.kit/5-prevent-clone-inside-another-repo/prevent-clone-inside-another-repo.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Prevent user from cloning a repo while already inside a repo + +if [[ $(git status 2> /dev/null ) ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You are trying to clone a repository when you are already in a" + echo "repository. You should change your current working directory to the" + echo "directory to where you want the newly cloned repository to be." + echo + echo "Change your current working directory to where you want the clone" + echo "to be:" + echo + echo " cd " + echo + echo "Re-run your git clone command:" + echo + echo " git clone " + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/5-prevent-commit-to-main/install-into-client.sh b/.kit/5-prevent-commit-to-main/install-into-client.sh new file mode 100755 index 0000000..cc4e743 --- /dev/null +++ b/.kit/5-prevent-commit-to-main/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-commit-to-main.sh" "$PROJECT_DIR/.git/hooks/pre-commit" +chmod +x "$PROJECT_DIR/.git/hooks/pre-commit" diff --git a/.kit/5-prevent-commit-to-main/prevent-commit-to-main.sh b/.kit/5-prevent-commit-to-main/prevent-commit-to-main.sh new file mode 100755 index 0000000..420a046 --- /dev/null +++ b/.kit/5-prevent-commit-to-main/prevent-commit-to-main.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +if [[ $(git symbolic-ref HEAD) == "refs/heads/main" ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You should not be committing to the main branch." + echo "You should be committing to a feature branch." + echo + echo "Here's how:" + echo + echo "1. Create a feature branch, if you don't already have one." + echo + echo " git branch " + echo + echo "2. Switch to that branch." + echo + echo " git switch " + echo + echo "3. Retry your commit." + echo + echo "That's it! Have fun! Meow!" + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/5-prevent-merge-into-self/install-into-instance.sh b/.kit/5-prevent-merge-into-self/install-into-instance.sh new file mode 100755 index 0000000..fd93379 --- /dev/null +++ b/.kit/5-prevent-merge-into-self/install-into-instance.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +cat "$SCRIPT_DIR/prevent-merge-into-self.sh" >> "$SCRIPT_DIR/../8-git-shim/sub-shims/pre-merge" diff --git a/.kit/5-prevent-merge-into-self/prevent-merge-into-self.sh b/.kit/5-prevent-merge-into-self/prevent-merge-into-self.sh new file mode 100755 index 0000000..c8e540b --- /dev/null +++ b/.kit/5-prevent-merge-into-self/prevent-merge-into-self.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + +if [ "$CURRENT_BRANCH" = "$2" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "You are merging a branch into itself. This has no effect." + echo "You probably intended to merge one branch into another." + echo + echo "To merge two branches, first switch to the branch you want to merge" + echo "into. Then merge the other branch into it. For example, if you want" + echo "to merge main into my-cool-feature branch, then do the following:" + echo + echo " git switch my-cool-feature" + echo " git merge main" + echo + echo "*********************************************************************" +fi diff --git a/.kit/5-prevent-merge-to-main/install-into-client.sh b/.kit/5-prevent-merge-to-main/install-into-client.sh new file mode 100755 index 0000000..b2ed56c --- /dev/null +++ b/.kit/5-prevent-merge-to-main/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-merge-to-main.sh" "$PROJECT_DIR/.git/hooks/pre-merge-commit" +chmod +x "$PROJECT_DIR/.git/hooks/pre-merge-commit" diff --git a/.kit/5-prevent-merge-to-main/prevent-merge-to-main.sh b/.kit/5-prevent-merge-to-main/prevent-merge-to-main.sh new file mode 100755 index 0000000..7447df5 --- /dev/null +++ b/.kit/5-prevent-merge-to-main/prevent-merge-to-main.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +if [[ $(git symbolic-ref HEAD) == "refs/heads/main" ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You should not be merging to the main branch." + echo "You should only be merging into a feature branch." + echo "The working tree is still in a merging state." + echo + echo "Before continuing, run the command:" + echo + echo " git reset --merge" + echo + echo "Ignore messages after this line" + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/5-prevent-pull-from-upstream-main-into-non-main/install-into-instance.sh b/.kit/5-prevent-pull-from-upstream-main-into-non-main/install-into-instance.sh new file mode 100755 index 0000000..e11c1be --- /dev/null +++ b/.kit/5-prevent-pull-from-upstream-main-into-non-main/install-into-instance.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +cat "$SCRIPT_DIR/prevent-pull-from-upstream-main-into-non-main.sh" >> "$SCRIPT_DIR/../8-git-shim/sub-shims/pre-pull" diff --git a/.kit/5-prevent-pull-from-upstream-main-into-non-main/prevent-pull-from-upstream-main-into-non-main.sh b/.kit/5-prevent-pull-from-upstream-main-into-non-main/prevent-pull-from-upstream-main-into-non-main.sh new file mode 100755 index 0000000..1e3acf8 --- /dev/null +++ b/.kit/5-prevent-pull-from-upstream-main-into-non-main/prevent-pull-from-upstream-main-into-non-main.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + + +if [ "$2" = "upstream" ] && [ "$3" = "main" ] ; then + BRANCH="$(git rev-parse --abbrev-ref HEAD)" + if [ "$BRANCH" != "main" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "It looks like you're trying to synchronize your clone and fork" + echo "with changes in upstream. That's great!" + echo + echo "But you just tried to pull changes from upstream's main into" + echo "your clone's $BRANCH branch." + echo "Instead, you need be pull them into your clone's main branch." + echo "Then you can finish by pushing pushing your clone's main to origin's." + echo + echo "Let's get you back on track. First switch to main, and then retry the" + echo "pull command." + echo "*********************************************************************" + exit 1 + fi +fi diff --git a/.kit/5-prevent-rebase/install-into-client.sh b/.kit/5-prevent-rebase/install-into-client.sh new file mode 100755 index 0000000..cedd614 --- /dev/null +++ b/.kit/5-prevent-rebase/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-rebase.sh" "$PROJECT_DIR/.git/hooks/pre-rebase" +chmod +x "$PROJECT_DIR/.git/hooks/pre-rebase" diff --git a/.kit/5-prevent-rebase/prevent-rebase.sh b/.kit/5-prevent-rebase/prevent-rebase.sh new file mode 100755 index 0000000..62f9f60 --- /dev/null +++ b/.kit/5-prevent-rebase/prevent-rebase.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +# Disallow all rebasing +echo "**********************************************************************" +printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" +echo "You should not be rebasing in this kit." +echo "You should be using 'git merge' instead." +echo "**********************************************************************" +exit 1 diff --git a/.kit/5-prevent-remote-to-non-upstream/install-into-instance.sh b/.kit/5-prevent-remote-to-non-upstream/install-into-instance.sh new file mode 100755 index 0000000..c416a2f --- /dev/null +++ b/.kit/5-prevent-remote-to-non-upstream/install-into-instance.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +cat "$SCRIPT_DIR/prevent-remote-to-non-upstream.sh" >> "$SCRIPT_DIR/../8-git-shim/sub-shims/pre-remote" diff --git a/.kit/5-prevent-remote-to-non-upstream/prevent-remote-to-non-upstream.sh b/.kit/5-prevent-remote-to-non-upstream/prevent-remote-to-non-upstream.sh new file mode 100755 index 0000000..16e0178 --- /dev/null +++ b/.kit/5-prevent-remote-to-non-upstream/prevent-remote-to-non-upstream.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +# This file is installed into 8-git-shim/sub-shims. +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +function convert-url-to-org-repo() { + url="$1" + if [[ "$url" =~ ^git.* ]] ; then + convert-git-url-to-org-repo "$url" + else + convert-http-url-to-org-repo "$url" + fi +} + +function convert-git-url-to-org-repo() { + url="$1" + url="$(remove-prefix-to-first-colon "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function convert-http-url-to-org-repo() { + url="$1" + url="$(remove-prefix-http "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function remove-prefix-to-first-colon() { + echo "${1#*:}" +} + +function remove-suffix-dot-git() { + echo "${1%.git}" +} + +function remove-prefix-http() { + local url="${1}" + url="${url#*//}" + echo "${url#*/}" +} + +if [ "$2" = "add" ] && [ "$3" = "upstream" ] ; then + # shellcheck disable=SC1091 + source "$SCRIPT_DIR/../../5-detect-upstream-clone/upstream-location.sh" + UPSTREAM_ORG_REPO="$(load-upstream-location)" + ORG_REPO="$(convert-url-to-org-repo "$4")" + if [ "$ORG_REPO" != "$UPSTREAM_ORG_REPO" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "I think you have the wrong URL for 'upstream'." + echo "One of the following is probably the problem:" + echo + echo " * The URL you gave points to your fork." + echo " * The URL you gave points to the original, real project." + echo " * The URL you gave does not end in .git ." + echo " * The URL you gave does not start with https:// ." + echo + echo "To get the correct URL, in a Web-browser:" + echo + echo " 1. Navigate to your fork" + echo " 2. Click the link near the top that follows 'forked from'." + echo " 3. Click the 'Code' button." + echo " 4. Select 'Local' and 'HTTPS'" + echo " 5. Click the copy button." + echo + echo "Now try to create the 'upstream' remote again." + echo "*********************************************************************" + exit 1 + fi +fi diff --git a/.kit/6-create-labels/labels.json b/.kit/6-create-labels/labels.json new file mode 100644 index 0000000..9982a2a --- /dev/null +++ b/.kit/6-create-labels/labels.json @@ -0,0 +1,67 @@ +[ + { + "name": "Round1", + "description": "First issues for COMP 190 Activity.", + "color": "6B4089" + }, + { + "name": "Round2", + "description": "Second issues for COMP 190 Activity.", + "color": "7AA01D" + }, + { + "name": "bug", + "description": "Something isn't working", + "color": "d73a4a" + }, + { + "name": "documentation", + "description": "Improvements or additions to documentation", + "color": "0075ca" + }, + { + "name": "duplicate", + "description": "This issue or pull request already exists", + "color": "cfd3d7" + }, + { + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef" + }, + { + "name": "good first issue", + "description": "Good for newcomers", + "color": "7057ff" + }, + { + "name": "help wanted", + "description": "Extra attention is needed", + "color": "008672" + }, + { + "name": "invalid", + "description": "This doesn't seem right", + "color": "e4e669" + }, + { + "name": "Links", + "description": "Link to be added to documentation.", + "color": "c5def5" + }, + { + "name": "question", + "description": "Further information is requested", + "color": "d876e3" + }, + { + "name": "Typos", + "description": "Typo in documentation to be fixed.", + "color": "A21517" + }, + { + "name": "wontfix", + "description": "This will not be worked on", + "color": "ffffff" + } +] diff --git a/.kit/6-create-labels/post-push-install-into-instance.sh b/.kit/6-create-labels/post-push-install-into-instance.sh new file mode 100755 index 0000000..015e61e --- /dev/null +++ b/.kit/6-create-labels/post-push-install-into-instance.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +cd "$SCRIPT_DIR" + +set -e + +yq '.[].color' < labels.json > colors.txt +yq '.[].name' < labels.json > names.txt +paste names.txt colors.txt > names-colors.txt + +IFS=$'\t' +while read -r n c ; do + gh label create --force "$n" --color "$c" &> /dev/null || true + sleep 1 +done < names-colors.txt +IFS=$' \t\n' + +rm names-colors.txt colors.txt names.txt diff --git a/.kit/7-create-issues/issues.json b/.kit/7-create-issues/issues.json new file mode 100644 index 0000000..972eb08 --- /dev/null +++ b/.kit/7-create-issues/issues.json @@ -0,0 +1,356 @@ +[ + { + "title": "Add Missing \"a\"", + "body": "Add the word \"a\" between \"in\" and \"module\" in the sentence \"JavaScript and CSS libraries can be included in module by adding them to the module configuration files\" under the \"JavaScript and CSS Libraries\" heading in the `README.md` file in the `farmdata2_modules/fd2_tabs/fd2_example` directory.", + "labels": [ + "documentation", + "Typos", + "Round1" + ], + "preassigned": true + }, + { + "title": "Format Role Names", + "body": "Change the role names \"manager,\" \"worker,\" and \"guest\" to be formatted in the same way that \"admin\" is. They should be formatted using back-ticks (\\`) for code instead of (\\_) for italics to match \"admin\" in the second bullet point under \"FarmData2 Module Structure\" in the `README.md` file in the `farmdata2_modules/fd2_tabs/fd2_example` directory.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ], + "preassigned": true + }, + { + "title": "Add Missing \"with\"", + "body": "Add the word \"with\" between \"experiment\" and \"FarmData2\" in the sentence \"The FD2 Example tab is created by a sample module and can be used as a sandbox in which to learn about and experiment FarmData2 modules like those that produce the FieldKit and BarnKit tabs.\" at the end of the paragraph following the \"FarmData2 Modules\" heading in the `README.md` file in the `farmdata2_modules/fd2_tabs/fd2_example` directory.", + "labels": [ + "documentation", + "Typos", + "Round1" + ], + "preassigned": true + }, + { + "title": "Fix Missing \"t\" Typo", + "body": "Change \"ext\" to \"text\" in the phrase \"(e.g. button, ext field)\" at the end of bullet point 3 under \"Component Tests\" in the \"Cypress\" section of ONBOARDING.md.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix \"comonent\" Typo", + "body": "Change \"comonent\" to \"component\" in the phrase \"A typical comonent test will:\" at the end of the first paragraph under \"Component Tests\" in the \"Cypress\" section of the `ONBOARDING.md` document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Lowercase \"f\" in \"farmOS\"", + "body": "In the paragraph in the \"FarmOS API\" section of the `ONBOARDING.md` file, all instances of \"FarmOS\" should be changed to \"farmOS\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix Missing \"t\" Typo", + "body": "Change \"ext\" to \"text\" in the phrase \" (e.g. button, ext field)\" at the end of bullet point 3 under \"End-To-End\" tests in the \"Cypress\" section of `ONBOARDING.md`.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix Italics", + "body": "Change \"_spec_s\" to \"\\*spec\\*s\" at the end of the sentence \"A test typically consists of a series of steps that are automated by the Cypress tests, called _spec_s.\" in the \"End-to-End Tests\" section under the \"Cypress\" heading in the`ONBOARDING.md` file. \r\n\r\nNote: The _spec_s or \\*spec\\*s is supposed to make the *spec* appear in italics. However, it turns out that \\* works within a word but \\_ does not.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Fix Typo of \"ad\" to \"as\"", + "body": "Change \"ad\" to \"as\" in the sentence \"An overview of Theia and its use ad an Integrated Development Environment.\" in the bullet point under \"Resources\" in the \"Editors\" section of the `ONBOARDING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add Missing \"that\"", + "body": "Add \"that\" between \"tutorial\" and \"walks\" in the bullet point \"Git Immersion: A tutorial walks through a series of ...\" in the \"Prerequisites\" section of the `ONBOARDING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Correct typo in \"followign\" ", + "body": "Correct the typo of \"followign\" to \"following\" in the sentence \"The followign two guides walk through how to work with existing open source projects and essentially follow GitFlow:\" in the second bullet point under \"Resources\" in the \"Prerequisites\" section of the `ONBOARDING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Make it Plural", + "body": "Change \"it\" to \"its\" in the sentence \"The FarmData2 community uses Zulip as it communication platform.\" in the first sentence of the \"Communications\" section of the `ONBOARDING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Make Starts Singular", + "body": "Change \"starts\" to \"start\" in the sentence \"This command will starts up the docker containers that are used by FarmData2.\" in the \"Starting FarmData2\" section of `INSTALL.md.`", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"command\"", + "body": "Change \"comman\" to \"command\" in the sentence \"But the above comman can be used ...\" that appears at the end of the \"Install the Sample Database Image\" section of the `INSTALL.md` document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Comma Usage", + "body": "Correct the comma usage in the sentence \"If you are unfamiliar with one or more of these technologies the ONBOARDING document provides additional information about each, as well as resources and activities for learning about them.\" that appears at the end of the \"Technology Onboarding\" section of the `CONTRIBUTING.md` document.\r\n\r\nAdd a comma between \"technologies\" and \"the ONBOARDING\"\r\nRemove the comma between \"about each\" and \"as well as\" ", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Make Update plural", + "body": "Change \"Update\" to \"Updates\" in the phrase \"Update to any of the FarmData2 documentation are welcome.\" in the first sentence of the \"Documentation\" section of the `CONTRIBUTING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Change \"is\" to \"it\"", + "body": "Correct the first \"is\" to be \"it\" in the phrase \"(e.g. platforms on which is is or is not seen).\" in the second bullet point under the \"Issue Gardening\" heading in the `CONTRIBUTING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Remove duplicate \"are\"", + "body": "The duplicate \"are\" should be removed from the phrase \"If you are are a user of FarmData2...\" that appears after the \"Bug Reports\" heading in the `CONTRIBUTING.md` document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Hyphenate step by step", + "body": "The adjective step by step should be hyphenated as step-by-step in the phrase \"The Install Directions give step by step instructions for getting FarmData2 up and running.\" just under the \"Participation\" heading in the `CONTRIBUTING.md` document.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Typo in Licensing Section", + "body": "Fix the typo by changing \"it\" to \"its\" in the sentence that ends \"while protecting both the project and it community of contributors.\" in the \"Licensing\" section of the `CONTRIBUTING.md` document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Remove mention of AUTHORS.md", + "body": "The `AUTHORS.md` file has not been created. The sentence \"The AUTHORS.md file contains a list of all contributors to the repository and is updated periodically.\" should be removed from the \"Attribution\" section of the `LICENSE.md` file.", + "labels": [ + "documentation", + "invalid", + "Round1" + ] + }, + { + "title": "Contributors \"acknowledge\" the DCO", + "body": "Change the word \"completes\" to \"acknowledges\" in the phrase \"This is done explicitly when when a contributor completes the...\" in the \"Contributions\" section of the `LICENSE.md` file.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Add Comma", + "body": "In the paragraph in the \"Description\" section of the `README.md` file add a comma after \"... veterinary care\" and before \"and logging...\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Make \"it\" possessive", + "body": "In the first sentence of the \"History\" section of the `README.md` file change the word \"it\" to be \"its\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"Installing\"", + "body": "In the bulleted list under \"Full installation details...\" in the \"Prerequisites\" section of the `INSTALL.md` file, the word \"Intallling\" should be corrected to be \"Installing\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Change \"which\" to \"that\"", + "body": "In the first paragraph of the `LICENSE.md` file the phrase \"...the agreement which governs...\" should be changed to read \"...the agreement that governs...\"", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Remove extra word", + "body": "The final sentence in the `LICENSE.md` file ends with the word \"based\". This word does not belong and should be removed.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": " Fix typo in \"Covenent\"", + "body": "The word \"Covenant\" is misspelled as \"Covenent\" in the paragraph under the \"Code of Conduct\" heading in the `CONTRIBUTING.md` file and should be corrected.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"FarmdData2\"", + "body": "In the paragraph under the \"Bug Fix / Feature Implementation\" heading in `CONTRIBUTING.md`, the word \"FarmData2\" contains an extra \"d\" that should be removed.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add missing \"on\"", + "body": "In the 5th bullet point in the \"Workflow\" section of the `CONTRIBUTING.md` file add the word \"on\" between \"branch\" and \"your\"", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"activities\"", + "body": "In the third paragraph under \"FarmData2 School\" in the `ONBOARADING.md` file, the word \"activities\" is misspelled as \"activites\" and should be corrected.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Capitalize \"axios\"", + "body": "In the third bullet point under \"Resources\" in the \"FarmOS API\" section of the `ONBOARDING.md` file capitalize the word \"axios\" so that it is \"Axios\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add missing \"n\"s", + "body": "In the paragraph in the \"Cypress\" section of the `ONBOARDING.md` file, the word \"running\" is missing an \"n\" in the phrase \"in isolation from the runing instance\" and also in the final sentence. This should be corrected in both locations.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add missing \"s\"", + "body": "In the second bullet point under \"Resources\" in the \"End-to_End Tests\" section of the `ONBOARDING.md` file, the word \"Cypress\" is mispelled as \"Cypres\" and should be corrected. Also, the word \"work\" should be pluralized to \"works\"", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"initializtion\"", + "body": "In the paragraph in the \"drush\" section of the `ONBOARDING.md` file, the word \"initialization\" is misspelled as \"initializtion\" and should be corrected.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Dickinson College Farm Link", + "body": "Change the text \"the Dickinson College Farm\" into a link to the farm in the History section of README.md.\r\n\r\nThe URL to use for the link is: https://www.dickinson.edu/farm\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "NSF Award Link", + "body": "Make the text \"DUE-2013069\" into a link to the award in the Acknowledgments section at the bottom of the README.md file.\r\n\r\nThe URL to use for the link is: https://www.nsf.gov/awardsearch/showAward?AWD_ID=2013069\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "GNOME CEC Link", + "body": "Make the phrase \"GNOME Community Engagement Challenge\" into a link in the Acknowledgements at the bottom of the README.md file.\r\n\r\nThe URL to use for the link is: https://www.gnome.org/challenge/\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "Add farmOS Link", + "body": "Change the word \"farmOS\" into a link in the Acknowledgements at the bottom of README.md. \r\n\r\nThe URL to use for the link is: https://farmos.org/\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax", + "labels": [ + "documentation", + "Links", + "Round2" + ] + } +] diff --git a/.kit/7-create-issues/post-push-install-into-instance.sh b/.kit/7-create-issues/post-push-install-into-instance.sh new file mode 100755 index 0000000..0293efc --- /dev/null +++ b/.kit/7-create-issues/post-push-install-into-instance.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +cd "$SCRIPT_DIR" + +set -e + +i=0 +o="$(yq ".[${i}]" < issues.json)" + +while [[ "$o" != "null" ]] ; do + title="$(echo "$o" | yq '.title')" + body="$(echo "$o" | yq '.body')" + labels="$(echo "$o" | yq '.labels[]' | sed ':a;N;$!ba;s/\n/,/g')" + preassigned="$(echo "$o" | yq '.preassigned')" + + echo "Creating issue: '$title'" + if [ $preassigned == true ] + then + echo "Pre-assigning issue '$title' to currently authenticated user" + gh issue create --title "$title" --body "$body" --label "$labels" --assignee "@me" + else + gh issue create --title "$title" --body "$body" --label "$labels" + fi + + sleep 3 + ((++i)) + o="$(yq ".[${i}]" < issues.json)" +done diff --git a/.kit/8-git-shim/install-into-client.sh b/.kit/8-git-shim/install-into-client.sh new file mode 100755 index 0000000..15eeb70 --- /dev/null +++ b/.kit/8-git-shim/install-into-client.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +INSTALL_INTO_SHELL_TEMPLATE_SH="$SCRIPT_DIR/install-into-shell_template.sh" +USER_KIT_DIR="$HOME/.kit" +INSTALL_INTO_SHELL_SH="$USER_KIT_DIR/install-into-shell.sh" +SUB_SHIMS_DIR="$SCRIPT_DIR/sub-shims" +BASHRC="${HOME}/.bashrc" + +install() { + generate-install-script + call-install-script-from-bashrc +} + +generate-install-script() { + # Embed the path to the sub-shims directory into the install-into-shell script. + mkdir -p "$USER_KIT_DIR" + sed "s@replace-with-path-to-sub-shims@$SUB_SHIMS_DIR@" \ + "$INSTALL_INTO_SHELL_TEMPLATE_SH" > "$INSTALL_INTO_SHELL_SH" + chmod +x "$INSTALL_INTO_SHELL_SH" +} + +call-install-script-from-bashrc() { + if [[ ! -e "$HOME/.kit/installed-gitkit-features" ]] ; then + printf '# install git-shim\n' >> "$BASHRC" + # shellcheck disable=SC2016 + printf '%s%s%s\n' 'eval "$(' "$INSTALL_INTO_SHELL_SH" ')"' >> "$BASHRC" + fi +} + +install diff --git a/.kit/8-git-shim/install-into-instance.sh b/.kit/8-git-shim/install-into-instance.sh new file mode 100755 index 0000000..b41b5da --- /dev/null +++ b/.kit/8-git-shim/install-into-instance.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +chmod +x "$SCRIPT_DIR/sub-shims/"* diff --git a/.kit/8-git-shim/install-into-shell_template.sh b/.kit/8-git-shim/install-into-shell_template.sh new file mode 100755 index 0000000..c25eccf --- /dev/null +++ b/.kit/8-git-shim/install-into-shell_template.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# shellcheck disable=SC2016 +cat <<'EOF' +#!/usr/bin/env bash + +GIT_COMMAND="$(which git)" +export GIT_COMMAND + +GIT_SUB_SHIMS="replace-with-path-to-sub-shims" +export GIT_SUB_SHIMS + +git() { + local SUB_COMMAND + SUB_COMMAND="$1" + + PRE_SUB_COMMAND="replace-with-path-to-sub-shims/pre-${SUB_COMMAND}" + if [ -x "$PRE_SUB_COMMAND" ] ; then + "$PRE_SUB_COMMAND" "$@" || return 1 + fi + + "$GIT_COMMAND" "$@" +} +EOF diff --git a/.kit/8-git-shim/sub-shims/.gitattributes b/.kit/8-git-shim/sub-shims/.gitattributes new file mode 100644 index 0000000..4708272 --- /dev/null +++ b/.kit/8-git-shim/sub-shims/.gitattributes @@ -0,0 +1 @@ +* eol=lf diff --git a/.kit/features/.gitattributes b/.kit/features/.gitattributes new file mode 100644 index 0000000..405f85c --- /dev/null +++ b/.kit/features/.gitattributes @@ -0,0 +1,152 @@ +# Common settings that generally should always be used with your language specific settings + +# Auto detect text files and perform LF normalization +* text=auto + +# +# The above will handle all files NOT found below +# + +# Documents +*.bibtex text diff=bibtex +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.md text diff=markdown +*.mdx text diff=markdown +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +*.sql text +*.epub diff=astextplain + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as text by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.eps binary + +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.sh text eol=lf +*.zsh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# Serialisation +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# Archives +*.7z binary +*.gz binary +*.tar binary +*.tgz binary +*.zip binary + +# Text files where line endings should be preserved +*.patch -text + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore +.gitkeep export-ignore + +# Apply override to all files in the directory +*.md linguist-detectable + +# Basic .gitattributes for a Vim repo. +# Vim on Linux works with LF only, Vim on Windows works with both LF and CRLF + +# Source files +# ============ +*.vim text eol=lf +.vimrc text eol=lf +.gvimrc text eol=lf + +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +# * text=auto + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just comment the entries below and +# uncomment the group further below +############################################################################### + +*.sln text eol=crlf +*.csproj text eol=crlf +*.vbproj text eol=crlf +*.vcxproj text eol=crlf +*.vcproj text eol=crlf +*.dbproj text eol=crlf +*.fsproj text eol=crlf +*.lsproj text eol=crlf +*.wixproj text eol=crlf +*.modelproj text eol=crlf +*.sqlproj text eol=crlf +*.wwaproj text eol=crlf + +*.xproj text eol=crlf +*.props text eol=crlf +*.filters text eol=crlf +*.vcxitems text eol=crlf + + +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +#*.xproj merge=binary +#*.props merge=binary +#*.filters merge=binary +#*.vcxitems merge=binary + +# gold.raw contains text, but we don't want eol conversions +*.raw binary diff --git a/.kit/features/0-display-welcome-message/post-install-into-client.sh b/.kit/features/0-display-welcome-message/post-install-into-client.sh new file mode 100755 index 0000000..80d9a47 --- /dev/null +++ b/.kit/features/0-display-welcome-message/post-install-into-client.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +echo "*********************************************************************" +printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" +echo +echo "I am your personal virtual assistant, and I am here to help you be" +echo "successful in the GitKit activities. You will hear from me every" +echo "once in a while when I think you might need some help." +echo +echo "(About my name:" +printf "I'm in the 'kit' and communicate through your 'tty' - get it? \xF0\x9F\x98\x81\n" +printf "Curious about the tty? See https://itsfoss.com/what-is-tty-in-linux/)\n" +echo "*********************************************************************" diff --git a/.kit/features/5-add-conflicts-for-merge-conflict-practice/0001-Conflicts-for-merge-conflict-practice.patch b/.kit/features/5-add-conflicts-for-merge-conflict-practice/0001-Conflicts-for-merge-conflict-practice.patch new file mode 100644 index 0000000..5550193 --- /dev/null +++ b/.kit/features/5-add-conflicts-for-merge-conflict-practice/0001-Conflicts-for-merge-conflict-practice.patch @@ -0,0 +1,35 @@ +From d008b798254a94457d7937dccd05e30ca1351ff8 Mon Sep 17 00:00:00 2001 +From: Grant Braught +Date: Fri, 12 Nov 2021 08:43:21 -0500 +Subject: [PATCH] Conflicts for practicing merges with conflicts + +Students can pull this branch and used it to practice resolving merge conflicts. It contains two merge conflicts with the 4 changes made in the addConflicts branch. +--- + README.md | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/README.md b/README.md +index 9d26f8e..26c2c3a 100644 +--- a/README.md ++++ b/README.md +@@ -22,7 +22,7 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic + + ### History ### + +-FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the Dickinson College Farm. The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. ++FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://a.different.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. + + ### Acknowledgements ### + +@@ -31,7 +31,7 @@ FarmData2 is powered by the farmOS open source project. + Support and assistance with FarmData2 development has been received from [The Non-Profit FOSS Institute](https://npfi.org/). + + The development of FarmData2 has received partial support from: +-* The GNOME Community Engagement Challenge: ++* The [GNOME Community Engagement Challenge](https://a.different.link3): + * [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png) + * The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. + * [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general). +-- +2.36.0 + diff --git a/.kit/features/5-add-conflicts-for-merge-conflict-practice/post-commit-install-into-instance.sh b/.kit/features/5-add-conflicts-for-merge-conflict-practice/post-commit-install-into-instance.sh new file mode 100755 index 0000000..c273b45 --- /dev/null +++ b/.kit/features/5-add-conflicts-for-merge-conflict-practice/post-commit-install-into-instance.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +git switch merge-conflict-practice +git rebase main +git switch main diff --git a/.kit/features/5-add-conflicts-for-merge-conflict-practice/pre-install-into-instance.sh b/.kit/features/5-add-conflicts-for-merge-conflict-practice/pre-install-into-instance.sh new file mode 100755 index 0000000..8cc6302 --- /dev/null +++ b/.kit/features/5-add-conflicts-for-merge-conflict-practice/pre-install-into-instance.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +cd "${REPO_DIR}" || exit 1 + +git switch main +git switch -c merge-conflict-practice +git am "${SCRIPT_DIR}"/*.patch || (echo "WARNING: could not apply patch" && git am --abort) +git switch main diff --git a/.kit/features/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch b/.kit/features/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch new file mode 100644 index 0000000..3ba5969 --- /dev/null +++ b/.kit/features/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch @@ -0,0 +1,40 @@ +From 8d03822daf8d30fc192b4543d7992ee0b0ea099e Mon Sep 17 00:00:00 2001 +From: Grant Braught +Date: Fri, 12 Nov 2021 08:37:19 -0500 +Subject: [PATCH] Changes that conflict with Round2 Issues. + +Each of the 190-Round2 issues in the issue tracker add links to the README.md file. This commit, when merged into main will introduce changes that conflict with all of the changes requested by those issues. It should be merged after students synch with main and as or just after they submit their PR's for the 190-Round2 issues. +--- + README.md | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/README.md b/README.md +index 9d26f8e..efb70b6 100644 +--- a/README.md ++++ b/README.md +@@ -22,18 +22,18 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic + + ### History ### + +-FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the Dickinson College Farm. The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. ++FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://not.the.right.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. + + ### Acknowledgements ### + +-FarmData2 is powered by the farmOS open source project. ++FarmData2 is powered by the [farmOS](https://not.the.right.link2) open source project. + + Support and assistance with FarmData2 development has been received from [The Non-Profit FOSS Institute](https://npfi.org/). + + The development of FarmData2 has received partial support from: +-* The GNOME Community Engagement Challenge: ++* The [GNOME Community Engagement Challenge](https://not.the.right.link3): + * [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png) +-* The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. ++* The National Science Foundation ([DUE-2013069](https://not.the.right.link4)) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. + * [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general). + + --- +-- +2.36.0 + diff --git a/.kit/features/5-add-round-two-conflicts/post-commit-install-into-instance.sh b/.kit/features/5-add-round-two-conflicts/post-commit-install-into-instance.sh new file mode 100755 index 0000000..f8fa632 --- /dev/null +++ b/.kit/features/5-add-round-two-conflicts/post-commit-install-into-instance.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +git switch add-round-two-conflicts +git rebase main +git switch main diff --git a/.kit/features/5-add-round-two-conflicts/pre-install-into-instance.sh b/.kit/features/5-add-round-two-conflicts/pre-install-into-instance.sh new file mode 100755 index 0000000..13e29ce --- /dev/null +++ b/.kit/features/5-add-round-two-conflicts/pre-install-into-instance.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +cd "${REPO_DIR}" || exit 1 + +git switch main +git switch -c add-round-two-conflicts +git am "${SCRIPT_DIR}"/*.patch || (echo "WARNING: could not apply patch" && git am --abort) +git switch main diff --git a/.kit/features/5-add-vscode-devcontainer/.gitpod.yml b/.kit/features/5-add-vscode-devcontainer/.gitpod.yml new file mode 100644 index 0000000..15d091f --- /dev/null +++ b/.kit/features/5-add-vscode-devcontainer/.gitpod.yml @@ -0,0 +1,23 @@ +# Image of workspace. Learn more: https://www.gitpod.io/docs/configure/workspaces/workspace-image +image: gitpod/workspace-full:latest + +tasks: + - name: Install KitClient (for VSCode Dev Container in GitPod) + command: | + mkdir -p /home/gitpod/.kitclient + git clone https://gitlab.com/hfossedu/kits/KitClient.git /home/gitpod/.local/lib/kitclient + chmod +x /home/gitpod/.local/lib/kitclient/src/install-kit-features-into-client.sh + sudo ln -s /home/gitpod/.local/lib/kitclient/src/install-kit-features-into-client.sh /usr/share/git-core/templates/hooks/post-checkout + cat /home/gitpod/.local/lib/kitclient/src/bashrc.additions >> /home/gitpod/.bashrc + mkdir -p "$HOME/.kitclient" + git config --global user.name > "$HOME/.kitclient/kituser.txt" + git config --global --add safe.directory "${PROJ_ROOT}" + git config --global pull.ff only + # git config --global credential.helper store + git config --global init.defaultBranch main + git config --global merge.conflictstyle diff3 + git config --global merge.tool vscode + git config --global mergetool.keepbackup false + git config --global mergetool.vscode.cmd 'code --wait $MERGED' + "${GITPOD_REPO_ROOT}/.kit/install-features-into-client/run.sh" + exec bash diff --git a/.kit/features/5-add-vscode-devcontainer/.gitpod/install-gitkit-client.sh b/.kit/features/5-add-vscode-devcontainer/.gitpod/install-gitkit-client.sh new file mode 100755 index 0000000..222a94c --- /dev/null +++ b/.kit/features/5-add-vscode-devcontainer/.gitpod/install-gitkit-client.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +PROJ_ROOT= +PROJ_ROOT="${1}" + +git config --global --add safe.directory "${PROJ_ROOT}" +git config --global pull.ff only +git config --global credential.helper store +git config --global init.defaultBranch main +git config --global merge.conflictstyle diff3 +git config --global merge.tool vscode +git config --global mergetool.keepbackup false +git config --global mergetool.vscode.cmd 'code --wait $MERGED' + +cat "${PROJ_ROOT}/.gitpod/bashrc-additions.sh" >> "${HOME}/.bashrc" + +"${PROJ_ROOT}/.kit/install-features-into-client/run.sh" diff --git a/.kit/features/5-add-vscode-devcontainer/.vscode/settings.json b/.kit/features/5-add-vscode-devcontainer/.vscode/settings.json new file mode 100644 index 0000000..4e8191a --- /dev/null +++ b/.kit/features/5-add-vscode-devcontainer/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.mergeEditor": true +} \ No newline at end of file diff --git a/.kit/features/5-add-vscode-devcontainer/install-into-instance.sh b/.kit/features/5-add-vscode-devcontainer/install-into-instance.sh new file mode 100755 index 0000000..b1b63d2 --- /dev/null +++ b/.kit/features/5-add-vscode-devcontainer/install-into-instance.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +set -e + +cp "$SCRIPT_DIR/.gitpod.yml" "$REPO_DIR" +cp -r "$SCRIPT_DIR/.vscode" "$REPO_DIR" diff --git a/.kit/features/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml b/.kit/features/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml new file mode 100644 index 0000000..cbc97d2 --- /dev/null +++ b/.kit/features/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml @@ -0,0 +1,13 @@ +name: "Allow anyone to self-assign an issue" + +on: [issue_comment] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: bhermann/issue-volunteer@v0.1.12 + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.kit/features/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh b/.kit/features/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh new file mode 100755 index 0000000..afc08f2 --- /dev/null +++ b/.kit/features/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +set -e + +workflows_dir="${REPO_DIR}/.github/workflows" +mkdir -p "$workflows_dir" +cp "$SCRIPT_DIR/allow-anyone-to-self-assign-an-issue.yaml" "$workflows_dir" diff --git a/.kit/features/5-allow-only-fast-foward-merges-on-main/install-into-client.sh b/.kit/features/5-allow-only-fast-foward-merges-on-main/install-into-client.sh new file mode 100755 index 0000000..dabd8d2 --- /dev/null +++ b/.kit/features/5-allow-only-fast-foward-merges-on-main/install-into-client.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +git config --local branch.main.mergeoptions "--no-ff" diff --git a/.kit/features/5-detect-upstream-clone/install-into-instance.sh b/.kit/features/5-detect-upstream-clone/install-into-instance.sh new file mode 100755 index 0000000..bfe5e93 --- /dev/null +++ b/.kit/features/5-detect-upstream-clone/install-into-instance.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +source "${SCRIPT_DIR}/upstream-location.sh" + +function main() { + save-upstream-location "$(get-upstream-location)" +} + +function get-upstream-location() { + get-origin-location +} + +function get-origin-location() { + convert-url-to-org-repo "$(get-origin-url)" +} + +function get-origin-url() { + git remote get-url origin +} + +function convert-url-to-org-repo() { + local n="$1" + if [[ "$n" =~ ^git.* ]] ; then + # remove git@github.com prefix + n="${n#git@github.com:}" + else + # remove https://github.com/ prefix + n="${n#https://*github.com/}" + fi + # remove .git suffix + n="${n%.git}" + echo "$n" +} + +function get-upstream-location-file() { + echo "$SCRIPT_DIR/upstream-location.txt" +} + +function commit-and-push-upstream-location() { + git add "$(get-upstream-location-file)" + git commit -m "build(kit): add upstream location" + git push +} + +main diff --git a/.kit/features/5-detect-upstream-clone/post-install-into-client.sh b/.kit/features/5-detect-upstream-clone/post-install-into-client.sh new file mode 100755 index 0000000..1fd00d8 --- /dev/null +++ b/.kit/features/5-detect-upstream-clone/post-install-into-client.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +# shellcheck disable=SC1091 +source "${SCRIPT_DIR}/upstream-location.sh" + +function main() { + detect-upstream-clone +} + +function detect-upstream-clone() { + upstream="$(load-upstream-location)" + origin="$(get-origin-location)" + + # Case insensitive check. + upstream="$(echo "$upstream" | tr '[:upper:]' '[:lower:]')" + origin="$(echo "$origin" | tr '[:upper:]' '[:lower:]')" + if [[ "$origin" == "$upstream" ]] ; then + display-error-message + fi +} + +function get-origin-location() { + convert-url-to-org-repo "$(get-origin-url)" +} + +function get-origin-url() { + git remote get-url origin +} + +function convert-url-to-org-repo() { + url="$1" + if [[ "$url" =~ ^git.* ]] ; then + convert-git-url-to-org-repo "$url" + else + convert-http-url-to-org-repo "$url" + fi +} + +function convert-git-url-to-org-repo() { + url="$1" + url="$(remove-prefix-to-first-colon "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function convert-http-url-to-org-repo() { + url="$1" + url="$(remove-prefix-http "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function remove-prefix-to-first-colon() { + echo "${1#*:}" +} + +function remove-suffix-dot-git() { + echo "${1%.git}" +} + +function remove-prefix-http() { + local url="${1}" + url="${url#*//}" + echo "${url#*/}" +} + +function display-error-message() { + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "Oops, I think you have cloned the upstream repository instead of your" + echo "fork. But don't worry. You can fix it!" + echo + echo "1. Use a browser to navigate to your fork and copy its URL." + echo "2. In this terminal, return to the parent directory," + echo " delete the current clone, and clone the fork as follows:" + echo + echo " cd .." + echo " rm -rf $(pwd)" + echo " git clone [PASTE_FORK_URL]" + echo + echo "3. Click reload in your browser to reload your development environment." + echo "*********************************************************************" +} + +main diff --git a/.kit/features/5-detect-upstream-clone/upstream-location.sh b/.kit/features/5-detect-upstream-clone/upstream-location.sh new file mode 100755 index 0000000..df7f2b1 --- /dev/null +++ b/.kit/features/5-detect-upstream-clone/upstream-location.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +UPSTREAM_LOCATION_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +save-upstream-location() { + echo "${1}" > "${UPSTREAM_LOCATION_DIR}/upstream-location.txt" +} + +load-upstream-location() { + cat "${UPSTREAM_LOCATION_DIR}/upstream-location.txt" +} diff --git a/.kit/features/5-detect-upstream-clone/upstream-location.txt b/.kit/features/5-detect-upstream-clone/upstream-location.txt new file mode 100644 index 0000000..d33ec02 --- /dev/null +++ b/.kit/features/5-detect-upstream-clone/upstream-location.txt @@ -0,0 +1 @@ +DickinsonCollege/DsonGitKit_S25 diff --git a/.kit/features/5-prevent-clone-inside-another-repo/install-into-instance.sh b/.kit/features/5-prevent-clone-inside-another-repo/install-into-instance.sh new file mode 100755 index 0000000..01b4a4b --- /dev/null +++ b/.kit/features/5-prevent-clone-inside-another-repo/install-into-instance.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +cat "$SCRIPT_DIR/prevent-clone-inside-another-repo.sh" >> "$SCRIPT_DIR/../8-git-shim/sub-shims/pre-clone" diff --git a/.kit/features/5-prevent-clone-inside-another-repo/prevent-clone-inside-another-repo.sh b/.kit/features/5-prevent-clone-inside-another-repo/prevent-clone-inside-another-repo.sh new file mode 100755 index 0000000..807b439 --- /dev/null +++ b/.kit/features/5-prevent-clone-inside-another-repo/prevent-clone-inside-another-repo.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Prevent user from cloning a repo while already inside a repo + +if [[ $(git status 2> /dev/null ) ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You are trying to clone a repository when you are already in a" + echo "repository. You should change your current working directory to the" + echo "directory to where you want the newly cloned repository to be." + echo + echo "Change your current working directory to where you want the clone" + echo "to be:" + echo + echo " cd " + echo + echo "Re-run your git clone command:" + echo + echo " git clone " + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/features/5-prevent-commit-to-main/install-into-client.sh b/.kit/features/5-prevent-commit-to-main/install-into-client.sh new file mode 100755 index 0000000..cc4e743 --- /dev/null +++ b/.kit/features/5-prevent-commit-to-main/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-commit-to-main.sh" "$PROJECT_DIR/.git/hooks/pre-commit" +chmod +x "$PROJECT_DIR/.git/hooks/pre-commit" diff --git a/.kit/features/5-prevent-commit-to-main/prevent-commit-to-main.sh b/.kit/features/5-prevent-commit-to-main/prevent-commit-to-main.sh new file mode 100755 index 0000000..420a046 --- /dev/null +++ b/.kit/features/5-prevent-commit-to-main/prevent-commit-to-main.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +if [[ $(git symbolic-ref HEAD) == "refs/heads/main" ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You should not be committing to the main branch." + echo "You should be committing to a feature branch." + echo + echo "Here's how:" + echo + echo "1. Create a feature branch, if you don't already have one." + echo + echo " git branch " + echo + echo "2. Switch to that branch." + echo + echo " git switch " + echo + echo "3. Retry your commit." + echo + echo "That's it! Have fun! Meow!" + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/features/5-prevent-merge-into-self/install-into-instance.sh b/.kit/features/5-prevent-merge-into-self/install-into-instance.sh new file mode 100755 index 0000000..fd93379 --- /dev/null +++ b/.kit/features/5-prevent-merge-into-self/install-into-instance.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +cat "$SCRIPT_DIR/prevent-merge-into-self.sh" >> "$SCRIPT_DIR/../8-git-shim/sub-shims/pre-merge" diff --git a/.kit/features/5-prevent-merge-into-self/prevent-merge-into-self.sh b/.kit/features/5-prevent-merge-into-self/prevent-merge-into-self.sh new file mode 100755 index 0000000..c8e540b --- /dev/null +++ b/.kit/features/5-prevent-merge-into-self/prevent-merge-into-self.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + +if [ "$CURRENT_BRANCH" = "$2" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "You are merging a branch into itself. This has no effect." + echo "You probably intended to merge one branch into another." + echo + echo "To merge two branches, first switch to the branch you want to merge" + echo "into. Then merge the other branch into it. For example, if you want" + echo "to merge main into my-cool-feature branch, then do the following:" + echo + echo " git switch my-cool-feature" + echo " git merge main" + echo + echo "*********************************************************************" +fi diff --git a/.kit/features/5-prevent-merge-to-main/install-into-client.sh b/.kit/features/5-prevent-merge-to-main/install-into-client.sh new file mode 100755 index 0000000..b2ed56c --- /dev/null +++ b/.kit/features/5-prevent-merge-to-main/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-merge-to-main.sh" "$PROJECT_DIR/.git/hooks/pre-merge-commit" +chmod +x "$PROJECT_DIR/.git/hooks/pre-merge-commit" diff --git a/.kit/features/5-prevent-merge-to-main/prevent-merge-to-main.sh b/.kit/features/5-prevent-merge-to-main/prevent-merge-to-main.sh new file mode 100755 index 0000000..7447df5 --- /dev/null +++ b/.kit/features/5-prevent-merge-to-main/prevent-merge-to-main.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +if [[ $(git symbolic-ref HEAD) == "refs/heads/main" ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You should not be merging to the main branch." + echo "You should only be merging into a feature branch." + echo "The working tree is still in a merging state." + echo + echo "Before continuing, run the command:" + echo + echo " git reset --merge" + echo + echo "Ignore messages after this line" + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/features/5-prevent-pull-from-upstream-main-into-non-main/install-into-instance.sh b/.kit/features/5-prevent-pull-from-upstream-main-into-non-main/install-into-instance.sh new file mode 100755 index 0000000..e11c1be --- /dev/null +++ b/.kit/features/5-prevent-pull-from-upstream-main-into-non-main/install-into-instance.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +cat "$SCRIPT_DIR/prevent-pull-from-upstream-main-into-non-main.sh" >> "$SCRIPT_DIR/../8-git-shim/sub-shims/pre-pull" diff --git a/.kit/features/5-prevent-pull-from-upstream-main-into-non-main/prevent-pull-from-upstream-main-into-non-main.sh b/.kit/features/5-prevent-pull-from-upstream-main-into-non-main/prevent-pull-from-upstream-main-into-non-main.sh new file mode 100755 index 0000000..1e3acf8 --- /dev/null +++ b/.kit/features/5-prevent-pull-from-upstream-main-into-non-main/prevent-pull-from-upstream-main-into-non-main.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + + +if [ "$2" = "upstream" ] && [ "$3" = "main" ] ; then + BRANCH="$(git rev-parse --abbrev-ref HEAD)" + if [ "$BRANCH" != "main" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "It looks like you're trying to synchronize your clone and fork" + echo "with changes in upstream. That's great!" + echo + echo "But you just tried to pull changes from upstream's main into" + echo "your clone's $BRANCH branch." + echo "Instead, you need be pull them into your clone's main branch." + echo "Then you can finish by pushing pushing your clone's main to origin's." + echo + echo "Let's get you back on track. First switch to main, and then retry the" + echo "pull command." + echo "*********************************************************************" + exit 1 + fi +fi diff --git a/.kit/features/5-prevent-rebase/install-into-client.sh b/.kit/features/5-prevent-rebase/install-into-client.sh new file mode 100755 index 0000000..cedd614 --- /dev/null +++ b/.kit/features/5-prevent-rebase/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-rebase.sh" "$PROJECT_DIR/.git/hooks/pre-rebase" +chmod +x "$PROJECT_DIR/.git/hooks/pre-rebase" diff --git a/.kit/features/5-prevent-rebase/prevent-rebase.sh b/.kit/features/5-prevent-rebase/prevent-rebase.sh new file mode 100755 index 0000000..62f9f60 --- /dev/null +++ b/.kit/features/5-prevent-rebase/prevent-rebase.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +# Disallow all rebasing +echo "**********************************************************************" +printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" +echo "You should not be rebasing in this kit." +echo "You should be using 'git merge' instead." +echo "**********************************************************************" +exit 1 diff --git a/.kit/features/5-prevent-remote-to-non-upstream/install-into-instance.sh b/.kit/features/5-prevent-remote-to-non-upstream/install-into-instance.sh new file mode 100755 index 0000000..c416a2f --- /dev/null +++ b/.kit/features/5-prevent-remote-to-non-upstream/install-into-instance.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +cat "$SCRIPT_DIR/prevent-remote-to-non-upstream.sh" >> "$SCRIPT_DIR/../8-git-shim/sub-shims/pre-remote" diff --git a/.kit/features/5-prevent-remote-to-non-upstream/prevent-remote-to-non-upstream.sh b/.kit/features/5-prevent-remote-to-non-upstream/prevent-remote-to-non-upstream.sh new file mode 100755 index 0000000..16e0178 --- /dev/null +++ b/.kit/features/5-prevent-remote-to-non-upstream/prevent-remote-to-non-upstream.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +# This file is installed into 8-git-shim/sub-shims. +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +function convert-url-to-org-repo() { + url="$1" + if [[ "$url" =~ ^git.* ]] ; then + convert-git-url-to-org-repo "$url" + else + convert-http-url-to-org-repo "$url" + fi +} + +function convert-git-url-to-org-repo() { + url="$1" + url="$(remove-prefix-to-first-colon "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function convert-http-url-to-org-repo() { + url="$1" + url="$(remove-prefix-http "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function remove-prefix-to-first-colon() { + echo "${1#*:}" +} + +function remove-suffix-dot-git() { + echo "${1%.git}" +} + +function remove-prefix-http() { + local url="${1}" + url="${url#*//}" + echo "${url#*/}" +} + +if [ "$2" = "add" ] && [ "$3" = "upstream" ] ; then + # shellcheck disable=SC1091 + source "$SCRIPT_DIR/../../5-detect-upstream-clone/upstream-location.sh" + UPSTREAM_ORG_REPO="$(load-upstream-location)" + ORG_REPO="$(convert-url-to-org-repo "$4")" + if [ "$ORG_REPO" != "$UPSTREAM_ORG_REPO" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "I think you have the wrong URL for 'upstream'." + echo "One of the following is probably the problem:" + echo + echo " * The URL you gave points to your fork." + echo " * The URL you gave points to the original, real project." + echo " * The URL you gave does not end in .git ." + echo " * The URL you gave does not start with https:// ." + echo + echo "To get the correct URL, in a Web-browser:" + echo + echo " 1. Navigate to your fork" + echo " 2. Click the link near the top that follows 'forked from'." + echo " 3. Click the 'Code' button." + echo " 4. Select 'Local' and 'HTTPS'" + echo " 5. Click the copy button." + echo + echo "Now try to create the 'upstream' remote again." + echo "*********************************************************************" + exit 1 + fi +fi diff --git a/.kit/features/6-create-labels/labels.json b/.kit/features/6-create-labels/labels.json new file mode 100644 index 0000000..9982a2a --- /dev/null +++ b/.kit/features/6-create-labels/labels.json @@ -0,0 +1,67 @@ +[ + { + "name": "Round1", + "description": "First issues for COMP 190 Activity.", + "color": "6B4089" + }, + { + "name": "Round2", + "description": "Second issues for COMP 190 Activity.", + "color": "7AA01D" + }, + { + "name": "bug", + "description": "Something isn't working", + "color": "d73a4a" + }, + { + "name": "documentation", + "description": "Improvements or additions to documentation", + "color": "0075ca" + }, + { + "name": "duplicate", + "description": "This issue or pull request already exists", + "color": "cfd3d7" + }, + { + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef" + }, + { + "name": "good first issue", + "description": "Good for newcomers", + "color": "7057ff" + }, + { + "name": "help wanted", + "description": "Extra attention is needed", + "color": "008672" + }, + { + "name": "invalid", + "description": "This doesn't seem right", + "color": "e4e669" + }, + { + "name": "Links", + "description": "Link to be added to documentation.", + "color": "c5def5" + }, + { + "name": "question", + "description": "Further information is requested", + "color": "d876e3" + }, + { + "name": "Typos", + "description": "Typo in documentation to be fixed.", + "color": "A21517" + }, + { + "name": "wontfix", + "description": "This will not be worked on", + "color": "ffffff" + } +] diff --git a/.kit/features/6-create-labels/post-push-install-into-instance.sh b/.kit/features/6-create-labels/post-push-install-into-instance.sh new file mode 100755 index 0000000..015e61e --- /dev/null +++ b/.kit/features/6-create-labels/post-push-install-into-instance.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +cd "$SCRIPT_DIR" + +set -e + +yq '.[].color' < labels.json > colors.txt +yq '.[].name' < labels.json > names.txt +paste names.txt colors.txt > names-colors.txt + +IFS=$'\t' +while read -r n c ; do + gh label create --force "$n" --color "$c" &> /dev/null || true + sleep 1 +done < names-colors.txt +IFS=$' \t\n' + +rm names-colors.txt colors.txt names.txt diff --git a/.kit/features/7-create-issues/issues.json b/.kit/features/7-create-issues/issues.json new file mode 100644 index 0000000..972eb08 --- /dev/null +++ b/.kit/features/7-create-issues/issues.json @@ -0,0 +1,356 @@ +[ + { + "title": "Add Missing \"a\"", + "body": "Add the word \"a\" between \"in\" and \"module\" in the sentence \"JavaScript and CSS libraries can be included in module by adding them to the module configuration files\" under the \"JavaScript and CSS Libraries\" heading in the `README.md` file in the `farmdata2_modules/fd2_tabs/fd2_example` directory.", + "labels": [ + "documentation", + "Typos", + "Round1" + ], + "preassigned": true + }, + { + "title": "Format Role Names", + "body": "Change the role names \"manager,\" \"worker,\" and \"guest\" to be formatted in the same way that \"admin\" is. They should be formatted using back-ticks (\\`) for code instead of (\\_) for italics to match \"admin\" in the second bullet point under \"FarmData2 Module Structure\" in the `README.md` file in the `farmdata2_modules/fd2_tabs/fd2_example` directory.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ], + "preassigned": true + }, + { + "title": "Add Missing \"with\"", + "body": "Add the word \"with\" between \"experiment\" and \"FarmData2\" in the sentence \"The FD2 Example tab is created by a sample module and can be used as a sandbox in which to learn about and experiment FarmData2 modules like those that produce the FieldKit and BarnKit tabs.\" at the end of the paragraph following the \"FarmData2 Modules\" heading in the `README.md` file in the `farmdata2_modules/fd2_tabs/fd2_example` directory.", + "labels": [ + "documentation", + "Typos", + "Round1" + ], + "preassigned": true + }, + { + "title": "Fix Missing \"t\" Typo", + "body": "Change \"ext\" to \"text\" in the phrase \"(e.g. button, ext field)\" at the end of bullet point 3 under \"Component Tests\" in the \"Cypress\" section of ONBOARDING.md.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix \"comonent\" Typo", + "body": "Change \"comonent\" to \"component\" in the phrase \"A typical comonent test will:\" at the end of the first paragraph under \"Component Tests\" in the \"Cypress\" section of the `ONBOARDING.md` document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Lowercase \"f\" in \"farmOS\"", + "body": "In the paragraph in the \"FarmOS API\" section of the `ONBOARDING.md` file, all instances of \"FarmOS\" should be changed to \"farmOS\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix Missing \"t\" Typo", + "body": "Change \"ext\" to \"text\" in the phrase \" (e.g. button, ext field)\" at the end of bullet point 3 under \"End-To-End\" tests in the \"Cypress\" section of `ONBOARDING.md`.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix Italics", + "body": "Change \"_spec_s\" to \"\\*spec\\*s\" at the end of the sentence \"A test typically consists of a series of steps that are automated by the Cypress tests, called _spec_s.\" in the \"End-to-End Tests\" section under the \"Cypress\" heading in the`ONBOARDING.md` file. \r\n\r\nNote: The _spec_s or \\*spec\\*s is supposed to make the *spec* appear in italics. However, it turns out that \\* works within a word but \\_ does not.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Fix Typo of \"ad\" to \"as\"", + "body": "Change \"ad\" to \"as\" in the sentence \"An overview of Theia and its use ad an Integrated Development Environment.\" in the bullet point under \"Resources\" in the \"Editors\" section of the `ONBOARDING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add Missing \"that\"", + "body": "Add \"that\" between \"tutorial\" and \"walks\" in the bullet point \"Git Immersion: A tutorial walks through a series of ...\" in the \"Prerequisites\" section of the `ONBOARDING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Correct typo in \"followign\" ", + "body": "Correct the typo of \"followign\" to \"following\" in the sentence \"The followign two guides walk through how to work with existing open source projects and essentially follow GitFlow:\" in the second bullet point under \"Resources\" in the \"Prerequisites\" section of the `ONBOARDING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Make it Plural", + "body": "Change \"it\" to \"its\" in the sentence \"The FarmData2 community uses Zulip as it communication platform.\" in the first sentence of the \"Communications\" section of the `ONBOARDING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Make Starts Singular", + "body": "Change \"starts\" to \"start\" in the sentence \"This command will starts up the docker containers that are used by FarmData2.\" in the \"Starting FarmData2\" section of `INSTALL.md.`", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"command\"", + "body": "Change \"comman\" to \"command\" in the sentence \"But the above comman can be used ...\" that appears at the end of the \"Install the Sample Database Image\" section of the `INSTALL.md` document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Comma Usage", + "body": "Correct the comma usage in the sentence \"If you are unfamiliar with one or more of these technologies the ONBOARDING document provides additional information about each, as well as resources and activities for learning about them.\" that appears at the end of the \"Technology Onboarding\" section of the `CONTRIBUTING.md` document.\r\n\r\nAdd a comma between \"technologies\" and \"the ONBOARDING\"\r\nRemove the comma between \"about each\" and \"as well as\" ", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Make Update plural", + "body": "Change \"Update\" to \"Updates\" in the phrase \"Update to any of the FarmData2 documentation are welcome.\" in the first sentence of the \"Documentation\" section of the `CONTRIBUTING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Change \"is\" to \"it\"", + "body": "Correct the first \"is\" to be \"it\" in the phrase \"(e.g. platforms on which is is or is not seen).\" in the second bullet point under the \"Issue Gardening\" heading in the `CONTRIBUTING.md` file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Remove duplicate \"are\"", + "body": "The duplicate \"are\" should be removed from the phrase \"If you are are a user of FarmData2...\" that appears after the \"Bug Reports\" heading in the `CONTRIBUTING.md` document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Hyphenate step by step", + "body": "The adjective step by step should be hyphenated as step-by-step in the phrase \"The Install Directions give step by step instructions for getting FarmData2 up and running.\" just under the \"Participation\" heading in the `CONTRIBUTING.md` document.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Typo in Licensing Section", + "body": "Fix the typo by changing \"it\" to \"its\" in the sentence that ends \"while protecting both the project and it community of contributors.\" in the \"Licensing\" section of the `CONTRIBUTING.md` document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Remove mention of AUTHORS.md", + "body": "The `AUTHORS.md` file has not been created. The sentence \"The AUTHORS.md file contains a list of all contributors to the repository and is updated periodically.\" should be removed from the \"Attribution\" section of the `LICENSE.md` file.", + "labels": [ + "documentation", + "invalid", + "Round1" + ] + }, + { + "title": "Contributors \"acknowledge\" the DCO", + "body": "Change the word \"completes\" to \"acknowledges\" in the phrase \"This is done explicitly when when a contributor completes the...\" in the \"Contributions\" section of the `LICENSE.md` file.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Add Comma", + "body": "In the paragraph in the \"Description\" section of the `README.md` file add a comma after \"... veterinary care\" and before \"and logging...\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Make \"it\" possessive", + "body": "In the first sentence of the \"History\" section of the `README.md` file change the word \"it\" to be \"its\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"Installing\"", + "body": "In the bulleted list under \"Full installation details...\" in the \"Prerequisites\" section of the `INSTALL.md` file, the word \"Intallling\" should be corrected to be \"Installing\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Change \"which\" to \"that\"", + "body": "In the first paragraph of the `LICENSE.md` file the phrase \"...the agreement which governs...\" should be changed to read \"...the agreement that governs...\"", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Remove extra word", + "body": "The final sentence in the `LICENSE.md` file ends with the word \"based\". This word does not belong and should be removed.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": " Fix typo in \"Covenent\"", + "body": "The word \"Covenant\" is misspelled as \"Covenent\" in the paragraph under the \"Code of Conduct\" heading in the `CONTRIBUTING.md` file and should be corrected.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"FarmdData2\"", + "body": "In the paragraph under the \"Bug Fix / Feature Implementation\" heading in `CONTRIBUTING.md`, the word \"FarmData2\" contains an extra \"d\" that should be removed.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add missing \"on\"", + "body": "In the 5th bullet point in the \"Workflow\" section of the `CONTRIBUTING.md` file add the word \"on\" between \"branch\" and \"your\"", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"activities\"", + "body": "In the third paragraph under \"FarmData2 School\" in the `ONBOARADING.md` file, the word \"activities\" is misspelled as \"activites\" and should be corrected.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Capitalize \"axios\"", + "body": "In the third bullet point under \"Resources\" in the \"FarmOS API\" section of the `ONBOARDING.md` file capitalize the word \"axios\" so that it is \"Axios\".", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add missing \"n\"s", + "body": "In the paragraph in the \"Cypress\" section of the `ONBOARDING.md` file, the word \"running\" is missing an \"n\" in the phrase \"in isolation from the runing instance\" and also in the final sentence. This should be corrected in both locations.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add missing \"s\"", + "body": "In the second bullet point under \"Resources\" in the \"End-to_End Tests\" section of the `ONBOARDING.md` file, the word \"Cypress\" is mispelled as \"Cypres\" and should be corrected. Also, the word \"work\" should be pluralized to \"works\"", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"initializtion\"", + "body": "In the paragraph in the \"drush\" section of the `ONBOARDING.md` file, the word \"initialization\" is misspelled as \"initializtion\" and should be corrected.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Dickinson College Farm Link", + "body": "Change the text \"the Dickinson College Farm\" into a link to the farm in the History section of README.md.\r\n\r\nThe URL to use for the link is: https://www.dickinson.edu/farm\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "NSF Award Link", + "body": "Make the text \"DUE-2013069\" into a link to the award in the Acknowledgments section at the bottom of the README.md file.\r\n\r\nThe URL to use for the link is: https://www.nsf.gov/awardsearch/showAward?AWD_ID=2013069\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "GNOME CEC Link", + "body": "Make the phrase \"GNOME Community Engagement Challenge\" into a link in the Acknowledgements at the bottom of the README.md file.\r\n\r\nThe URL to use for the link is: https://www.gnome.org/challenge/\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "Add farmOS Link", + "body": "Change the word \"farmOS\" into a link in the Acknowledgements at the bottom of README.md. \r\n\r\nThe URL to use for the link is: https://farmos.org/\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax", + "labels": [ + "documentation", + "Links", + "Round2" + ] + } +] diff --git a/.kit/features/7-create-issues/post-push-install-into-instance.sh b/.kit/features/7-create-issues/post-push-install-into-instance.sh new file mode 100755 index 0000000..0293efc --- /dev/null +++ b/.kit/features/7-create-issues/post-push-install-into-instance.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +cd "$SCRIPT_DIR" + +set -e + +i=0 +o="$(yq ".[${i}]" < issues.json)" + +while [[ "$o" != "null" ]] ; do + title="$(echo "$o" | yq '.title')" + body="$(echo "$o" | yq '.body')" + labels="$(echo "$o" | yq '.labels[]' | sed ':a;N;$!ba;s/\n/,/g')" + preassigned="$(echo "$o" | yq '.preassigned')" + + echo "Creating issue: '$title'" + if [ $preassigned == true ] + then + echo "Pre-assigning issue '$title' to currently authenticated user" + gh issue create --title "$title" --body "$body" --label "$labels" --assignee "@me" + else + gh issue create --title "$title" --body "$body" --label "$labels" + fi + + sleep 3 + ((++i)) + o="$(yq ".[${i}]" < issues.json)" +done diff --git a/.kit/features/8-git-shim/install-into-client.sh b/.kit/features/8-git-shim/install-into-client.sh new file mode 100755 index 0000000..15eeb70 --- /dev/null +++ b/.kit/features/8-git-shim/install-into-client.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +INSTALL_INTO_SHELL_TEMPLATE_SH="$SCRIPT_DIR/install-into-shell_template.sh" +USER_KIT_DIR="$HOME/.kit" +INSTALL_INTO_SHELL_SH="$USER_KIT_DIR/install-into-shell.sh" +SUB_SHIMS_DIR="$SCRIPT_DIR/sub-shims" +BASHRC="${HOME}/.bashrc" + +install() { + generate-install-script + call-install-script-from-bashrc +} + +generate-install-script() { + # Embed the path to the sub-shims directory into the install-into-shell script. + mkdir -p "$USER_KIT_DIR" + sed "s@replace-with-path-to-sub-shims@$SUB_SHIMS_DIR@" \ + "$INSTALL_INTO_SHELL_TEMPLATE_SH" > "$INSTALL_INTO_SHELL_SH" + chmod +x "$INSTALL_INTO_SHELL_SH" +} + +call-install-script-from-bashrc() { + if [[ ! -e "$HOME/.kit/installed-gitkit-features" ]] ; then + printf '# install git-shim\n' >> "$BASHRC" + # shellcheck disable=SC2016 + printf '%s%s%s\n' 'eval "$(' "$INSTALL_INTO_SHELL_SH" ')"' >> "$BASHRC" + fi +} + +install diff --git a/.kit/features/8-git-shim/install-into-instance.sh b/.kit/features/8-git-shim/install-into-instance.sh new file mode 100755 index 0000000..b41b5da --- /dev/null +++ b/.kit/features/8-git-shim/install-into-instance.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +chmod +x "$SCRIPT_DIR/sub-shims/"* diff --git a/.kit/features/8-git-shim/install-into-shell_template.sh b/.kit/features/8-git-shim/install-into-shell_template.sh new file mode 100755 index 0000000..c25eccf --- /dev/null +++ b/.kit/features/8-git-shim/install-into-shell_template.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# shellcheck disable=SC2016 +cat <<'EOF' +#!/usr/bin/env bash + +GIT_COMMAND="$(which git)" +export GIT_COMMAND + +GIT_SUB_SHIMS="replace-with-path-to-sub-shims" +export GIT_SUB_SHIMS + +git() { + local SUB_COMMAND + SUB_COMMAND="$1" + + PRE_SUB_COMMAND="replace-with-path-to-sub-shims/pre-${SUB_COMMAND}" + if [ -x "$PRE_SUB_COMMAND" ] ; then + "$PRE_SUB_COMMAND" "$@" || return 1 + fi + + "$GIT_COMMAND" "$@" +} +EOF diff --git a/.kit/features/8-git-shim/sub-shims/.gitattributes b/.kit/features/8-git-shim/sub-shims/.gitattributes new file mode 100644 index 0000000..4708272 --- /dev/null +++ b/.kit/features/8-git-shim/sub-shims/.gitattributes @@ -0,0 +1 @@ +* eol=lf diff --git a/.kit/features/8-git-shim/sub-shims/pre-clone b/.kit/features/8-git-shim/sub-shims/pre-clone new file mode 100755 index 0000000..807b439 --- /dev/null +++ b/.kit/features/8-git-shim/sub-shims/pre-clone @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Prevent user from cloning a repo while already inside a repo + +if [[ $(git status 2> /dev/null ) ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You are trying to clone a repository when you are already in a" + echo "repository. You should change your current working directory to the" + echo "directory to where you want the newly cloned repository to be." + echo + echo "Change your current working directory to where you want the clone" + echo "to be:" + echo + echo " cd " + echo + echo "Re-run your git clone command:" + echo + echo " git clone " + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/features/8-git-shim/sub-shims/pre-merge b/.kit/features/8-git-shim/sub-shims/pre-merge new file mode 100755 index 0000000..c8e540b --- /dev/null +++ b/.kit/features/8-git-shim/sub-shims/pre-merge @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + +if [ "$CURRENT_BRANCH" = "$2" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "You are merging a branch into itself. This has no effect." + echo "You probably intended to merge one branch into another." + echo + echo "To merge two branches, first switch to the branch you want to merge" + echo "into. Then merge the other branch into it. For example, if you want" + echo "to merge main into my-cool-feature branch, then do the following:" + echo + echo " git switch my-cool-feature" + echo " git merge main" + echo + echo "*********************************************************************" +fi diff --git a/.kit/features/8-git-shim/sub-shims/pre-pull b/.kit/features/8-git-shim/sub-shims/pre-pull new file mode 100755 index 0000000..1e3acf8 --- /dev/null +++ b/.kit/features/8-git-shim/sub-shims/pre-pull @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + + +if [ "$2" = "upstream" ] && [ "$3" = "main" ] ; then + BRANCH="$(git rev-parse --abbrev-ref HEAD)" + if [ "$BRANCH" != "main" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "It looks like you're trying to synchronize your clone and fork" + echo "with changes in upstream. That's great!" + echo + echo "But you just tried to pull changes from upstream's main into" + echo "your clone's $BRANCH branch." + echo "Instead, you need be pull them into your clone's main branch." + echo "Then you can finish by pushing pushing your clone's main to origin's." + echo + echo "Let's get you back on track. First switch to main, and then retry the" + echo "pull command." + echo "*********************************************************************" + exit 1 + fi +fi diff --git a/.kit/features/8-git-shim/sub-shims/pre-remote b/.kit/features/8-git-shim/sub-shims/pre-remote new file mode 100755 index 0000000..16e0178 --- /dev/null +++ b/.kit/features/8-git-shim/sub-shims/pre-remote @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +# This file is installed into 8-git-shim/sub-shims. +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" + +function convert-url-to-org-repo() { + url="$1" + if [[ "$url" =~ ^git.* ]] ; then + convert-git-url-to-org-repo "$url" + else + convert-http-url-to-org-repo "$url" + fi +} + +function convert-git-url-to-org-repo() { + url="$1" + url="$(remove-prefix-to-first-colon "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function convert-http-url-to-org-repo() { + url="$1" + url="$(remove-prefix-http "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function remove-prefix-to-first-colon() { + echo "${1#*:}" +} + +function remove-suffix-dot-git() { + echo "${1%.git}" +} + +function remove-prefix-http() { + local url="${1}" + url="${url#*//}" + echo "${url#*/}" +} + +if [ "$2" = "add" ] && [ "$3" = "upstream" ] ; then + # shellcheck disable=SC1091 + source "$SCRIPT_DIR/../../5-detect-upstream-clone/upstream-location.sh" + UPSTREAM_ORG_REPO="$(load-upstream-location)" + ORG_REPO="$(convert-url-to-org-repo "$4")" + if [ "$ORG_REPO" != "$UPSTREAM_ORG_REPO" ] ; then + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "I think you have the wrong URL for 'upstream'." + echo "One of the following is probably the problem:" + echo + echo " * The URL you gave points to your fork." + echo " * The URL you gave points to the original, real project." + echo " * The URL you gave does not end in .git ." + echo " * The URL you gave does not start with https:// ." + echo + echo "To get the correct URL, in a Web-browser:" + echo + echo " 1. Navigate to your fork" + echo " 2. Click the link near the top that follows 'forked from'." + echo " 3. Click the 'Code' button." + echo " 4. Select 'Local' and 'HTTPS'" + echo " 5. Click the copy button." + echo + echo "Now try to create the 'upstream' remote again." + echo "*********************************************************************" + exit 1 + fi +fi diff --git a/.kit/features/install-features-into-client/run.sh b/.kit/features/install-features-into-client/run.sh new file mode 100755 index 0000000..8405c0f --- /dev/null +++ b/.kit/features/install-features-into-client/run.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +## Called by KitClient to install features. +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +set -e + +mkdir -p "$HOME/.kit/" +touch "$HOME/.kit/installing-gitkit-features" + +## Move to the root of the project. +cd "$SCRIPT_DIR" +while [[ ! -d .git ]] ; do + cd .. +done + +## Install features into the client. +for feature in ./.kit/features/* ; do + script="$feature"/install-into-client.sh + if [[ -e "$script" ]] ; then + "$script" + fi +done + +## Run post installs. +for feature in ./.kit/features/* ; do + script="$feature"/post-install-into-client.sh + if [[ -e "$script" ]] ; then + "$script" + fi +done + +touch "$HOME/.kit/installed-gitkit-features" +rm "$HOME/.kit/installing-gitkit-features" diff --git a/.kit/install-features-into-client/run.sh b/.kit/install-features-into-client/run.sh new file mode 100755 index 0000000..8405c0f --- /dev/null +++ b/.kit/install-features-into-client/run.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +## Called by KitClient to install features. +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +set -e + +mkdir -p "$HOME/.kit/" +touch "$HOME/.kit/installing-gitkit-features" + +## Move to the root of the project. +cd "$SCRIPT_DIR" +while [[ ! -d .git ]] ; do + cd .. +done + +## Install features into the client. +for feature in ./.kit/features/* ; do + script="$feature"/install-into-client.sh + if [[ -e "$script" ]] ; then + "$script" + fi +done + +## Run post installs. +for feature in ./.kit/features/* ; do + script="$feature"/post-install-into-client.sh + if [[ -e "$script" ]] ; then + "$script" + fi +done + +touch "$HOME/.kit/installed-gitkit-features" +rm "$HOME/.kit/installing-gitkit-features" diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4e8191a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.mergeEditor": true +} \ No newline at end of file