Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Dec 8, 2024
1 parent a3214b0 commit 5201fe5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Biome
Submodule Biome updated 1 files
+11 −0 DEPENDENTS.md
11 changes: 11 additions & 0 deletions DEPENDENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dependents stats for CodeEditorLand/Dependency

[![Generated by github-dependents-info](https://img.shields.io/static/v1?label=Used%20by&message=0&color=informational&logo=slickpic)](https://github.com/CodeEditorLand/Dependency/network/dependents)
[![Generated by github-dependents-info](https://img.shields.io/static/v1?label=Used%20by%20(public)&message=0&color=informational&logo=slickpic)](https://github.com/CodeEditorLand/Dependency/network/dependents)
[![Generated by github-dependents-info](https://img.shields.io/static/v1?label=Used%20by%20(private)&message=0&color=informational&logo=slickpic)](https://github.com/CodeEditorLand/Dependency/network/dependents)
[![Generated by github-dependents-info](https://img.shields.io/static/v1?label=Used%20by%20(stars)&message=0&color=informational&logo=slickpic)](https://github.com/CodeEditorLand/Dependency/network/dependents)

| Repository | Stars |
| :-------- | -----: |

_Generated using [github-dependents-info](https://github.com/nvuillam/github-dependents-info), by [Nicolas Vuillamy](https://github.com/nvuillam)_
40 changes: 30 additions & 10 deletions Maintain/Fn/Cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,62 @@
Fn() {
Owner=$(\git config --get Source.Owner)

if [ -z "$Owner" ]; then
if [ -z "$Owner" ] || [ "$Owner" = "null" ]; then
Owner=$(\gh repo view --json owner | \jq -r '.owner.login')

\git config Source.Owner "$Owner"
if [ -n "$Owner" ] && [ "$Owner" != "null" ]; then
\git config Source.Owner "$Owner"
else
echo "Could not git config Source.Owner"
fi
fi

Name=$(\git config --get Source.Name)

if [ -z "$Name" ]; then
if [ -z "$Name" ] || [ "$Name" = "null" ]; then
Name=$(\gh repo view --json name | \jq -r '.name')

\git config Source.Name "$Name"
if [ -n "$Name" ] && [ "$Name" != "null" ]; then
\git config Source.Name "$Name"
else
echo "Could not git config Source.Name"
fi
fi

OwnerParent=$(\git config --get Parent.Owner)

if [ -z "$OwnerParent" ]; then
if [ -z "$OwnerParent" ] || [ "$OwnerParent" = "null" ]; then
OwnerParent=$(\gh repo view --json parent | \jq -r '.parent.owner.login')

\git config Parent.Owner "$OwnerParent"
if [ -n "$OwnerParent" ] && [ "$OwnerParent" != "null" ]; then
\git config Parent.Owner "$OwnerParent"
else
echo "Could not git config Parent.Owner"
fi
fi

NameParent=$(\git config --get Parent.Name)

if [ -z "$NameParent" ]; then
if [ -z "$NameParent" ] || [ "$NameParent" = "null" ]; then
NameParent=$(\gh repo view --json parent | \jq -r '.parent.name')

\git config Parent.Name "$NameParent"
if [ -n "$NameParent" ] && [ "$NameParent" != "null" ]; then
\git config Parent.Name "$NameParent"
else
echo "Could not git config Parent.Name"
fi
fi

BranchParent=$(\git config --get Parent.Branch)

if [ -z "$BranchParent" ]; then
if [ -z "$BranchParent" ] || [ "$BranchParent" = "null" ]; then
BranchParent=$(\gh repo view "$OwnerParent/$NameParent" --json defaultBranchRef | \jq -r '.defaultBranchRef.name')

\git config Parent.Branch "$BranchParent"
if [ -n "$BranchParent" ] && [ "$BranchParent" != "null" ]; then
\git config Parent.Branch "$BranchParent"
else
echo "Could not git config Parent.Branch"
fi
fi
}

Expand Down

0 comments on commit 5201fe5

Please sign in to comment.