Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/github/gh-repo-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function list_github_repo() {
tmp_file=$(mktemp)

# Get all repositories
while [ "$endpoint" ]; do
while [[ "$endpoint" ]]; do
repos=$(curl --proto "=https" --tlsv1.2 -sSf -L -H "Authorization: token $GITHUB_TOKEN" "$endpoint")
echo "$repos" >> "$tmp_file"

Expand Down
6 changes: 3 additions & 3 deletions src/gitnap/gn-init-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ function initialize_git_repo() {
git init --initial-branch=main

# Check for existing README.md file
if [ ! -f "README.md" ]; then
if [[ ! -f "README.md" ]]; then
echo "# $repo" > README.md
fi

git add README.md

# Handle optional language parameter
if [ -n "$1" ]; then
if [[ -n "$1" ]]; then
# Language name from parameter
language="$1"
download_gitignore "$language"
git add .gitignore
fi

# Handle optional license parameter
if [ -n "$2" ]; then
if [[ -n "$2" ]]; then
# License type from parameter
license="$2"
download_license "$license"
Expand Down
6 changes: 3 additions & 3 deletions src/utils/endpoints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function build_bb_endpoint() {
repo="$3"

if [[ -z "$route" || -z "$owner" || -z "$repo" ]]; then
echo "Error: route, owner, and repository are required for Bitbucket."
echo "Error: route, owner, and repository are required for Bitbucket." >&2
exit 1
fi

Expand Down Expand Up @@ -58,7 +58,7 @@ function build_gh_endpoint() {
repo="$3"

if [[ -z "$route" || -z "$owner" || -z "$repo" ]]; then
echo "Error: route, owner, and repository are required for GitHub."
echo "Error: route, owner, and repository are required for GitHub." >&2
exit 1
fi

Expand Down Expand Up @@ -95,7 +95,7 @@ function build_gl_endpoint() {
slash_encoded="%2F"

if [[ -z "$route" || -z "$owner" || -z "$repo" ]]; then
echo "Error: route, owner, and repository are required for Gitlab."
echo "Error: route, owner, and repository are required for Gitlab." >&2
exit 1
fi

Expand Down
Loading