Skip to content

Commit 817ada4

Browse files
committed
chore: minor code cleanup
1 parent a581226 commit 817ada4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

scripts/clone-repo.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cd "$local_repo_folder" || return 1
1515
if [[ $clone_depth == "0" ]]; then
1616
git clone "$url" --no-single-branch --no-tags # get branches, but not tags
1717
else
18-
# WARN depth=2 ensures that amending a shallow commit does not result in a
18+
# WARN depth=1 is dangerous, as amending such a commit does result in a
1919
# new commit without parent, effectively destroying git history (!!)
2020
[[ $clone_depth == "1" ]] && clone_depth=2
2121

@@ -39,9 +39,10 @@ if [[ "$restore_mtime" == "1" ]]; then
3939
fi
4040

4141
#───────────────────────────────────────────────────────────────────────────────
42-
# FORK ON CLONE (if owner)
42+
# FORK ON CLONE (if not owner)
4343

44-
if [[ "$ownerOfRepo" != "1" && "$fork_on_clone" == "1" ]]; then
44+
# INFO Alfred stores checkbox settings as `"1"` or `"0"`, and variables in stringified form.
45+
if [[ "$ownerOfRepo" != "true" && "$fork_on_clone" == "1" ]]; then
4546
if [[ ! -x "$(command -v gh)" ]]; then print "\`gh\` not installed." && return 1; fi
4647

4748
gh repo fork --remote=false

scripts/my-github-repos.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function run() {
134134

135135
return JSON.stringify({
136136
items: scriptFilterArr,
137-
variables: { ownerOfRepo: "1" },
137+
variables: { ownerOfRepo: "true" },
138138
cache: {
139139
seconds: 15, // short, since cloned repos should be available immediately
140140
loosereload: true,

0 commit comments

Comments
 (0)