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/bitbucket/bb-pr-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function create_bitbucket_pullrequest() {
endpoint="$(build_bb_endpoint "PR" "$WORKSPACE" "$REPO")"

# Create the repository using curl
response=$(curl -sSL -X POST "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X POST "$endpoint" \
-H "$BITBUCKET_AUTH" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
Expand Down
2 changes: 1 addition & 1 deletion src/bitbucket/bb-pr-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function create_bitbucket_pullrequest() {
endpoint="$endpoint/$pr/merge"

# Create the repository using curl
response=$(curl -sSL -X POST "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X POST "$endpoint" \
-H "$BITBUCKET_AUTH" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
Expand Down
2 changes: 1 addition & 1 deletion src/bitbucket/bb-pr-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function update_bitbucket_pullrequest() {
endpoint="$pr_endpoint/$pr"

# Create the repository using curl
response=$(curl -sSL -X PUT "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X PUT "$endpoint" \
-H "$BITBUCKET_AUTH" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
Expand Down
2 changes: 1 addition & 1 deletion src/bitbucket/bb-repo-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function create_bitbucket_repo() {
endpoint="https://api.bitbucket.org/2.0/repositories/$WORKSPACE/$REPO"

# Create Bitbucket repository
response=$(curl -sSL -X POST "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X POST "$endpoint" \
-H "$BITBUCKET_AUTH" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
Expand Down
2 changes: 1 addition & 1 deletion src/bitbucket/bb-repo-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function delete_bitbucket_repo() {

if [[ $confirmation =~ ^[Yy]$ ]]; then
# Delete the repository
response=$(curl -sSL -X DELETE "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X DELETE "$endpoint" \
-H "$BITBUCKET_AUTH" )

# Check if there are errors
Expand Down
2 changes: 1 addition & 1 deletion src/bitbucket/bb-repo-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function edit_bitbucket_repo() {
endpoint="https://api.bitbucket.org/2.0/repositories/$WORKSPACE/$REPO"

# Edit Bitbucket repository
response=$(curl -sSL -X PUT "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X PUT "$endpoint" \
-H "$BITBUCKET_AUTH" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-notification-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function delete_github_notifications() {
endpoint="https://api.github.com/notifications/threads/$NOTIFICATION_ID"

# Delete notifications
response=$(curl -sSL -X DELETE "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X DELETE "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" )
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-notification-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function list_github_notifications() {
endpoint="https://api.github.com/notifications"

# Get notifications
response=$(curl -sSL "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" )
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-pr-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function create_github_pullrequest() {
endpoint="$(build_gh_endpoint "PR" "$OWNER" "$REPO")"

# Create the repository using curl
response=$(curl -sSL -X POST "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X POST "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-pr-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function merge_github_pullrequest() {
endpoint="$pr_endpoint/$pr/merge"

# Create the repository using curl
response=$(curl -sSL -X PUT "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X PUT "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-pr-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function update_github_pullrequest() {
endpoint="$pr_endpoint/$pr"

# Create the repository using curl
response=$(curl -sSL -X PATCH "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X PATCH "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-repo-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function create_github_repo() {
endpoint="https://api.github.com/user/repos"

# Create the repository using curl
response=$(curl -sSL -X POST "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X POST "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-repo-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function delete_github_repo() {

if [[ $confirmation =~ ^[Yy]$ ]]; then
# Delete the repository using curl
response=$(curl -sSL -X DELETE "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X DELETE "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" )
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-repo-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function edit_github_repo() {
endpoint="https://api.github.com/repos/$OWNER/$REPO"

# Edit the repository using curl
response=$(curl -sSL -X PATCH "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X PATCH "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
Expand Down
6 changes: 3 additions & 3 deletions src/github/gh-repo-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ function list_github_repo() {

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

# Iterate through each repository in the response
for repo_url in $(echo "$repos" | jq -r '.[].url'); do
response=$(curl -sSL -H "Authorization: token $GITHUB_TOKEN" "$repo_url")
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -H "Authorization: token $GITHUB_TOKEN" "$repo_url")
echo "$response" >> "$tmp_file"
done

# Check for more pages
endpoint=$(curl -sSL -I -H "Authorization: token $GITHUB_TOKEN" "$endpoint" | grep -i '^link:' | sed -n 's/.*<\(.*\)>; rel="next".*/\1/p')
endpoint=$(curl --proto "=https" --tlsv1.2 -sSf -L -I -H "Authorization: token $GITHUB_TOKEN" "$endpoint" | grep -i '^link:' | sed -n 's/.*<\(.*\)>; rel="next".*/\1/p')
done

less "$tmp_file"
Expand Down
2 changes: 1 addition & 1 deletion src/github/gh-search-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function search_github_repo() {
# Construct API Endpoint
endpoint="https://api.github.com/search/repositories?q=$QUERY"

response=$(curl -s "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L "$endpoint" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
Expand Down
2 changes: 1 addition & 1 deletion src/gitlab/gl-pr-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function create_gitlab_pullrequest() {
endpoint="$(build_gl_endpoint "PR" "$OWNER" "$REPO")"

# Create the repository using curl
response=$(curl -sSL -X POST "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X POST "$endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GITLAB_TOKEN" \
-d "$payload" )
Expand Down
2 changes: 1 addition & 1 deletion src/gitlab/gl-pr-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function merge_gitlab_pullrequest() {
endpoint="$pr_endpoint/$pr/merge"

# Create the repository using curl
response=$(curl -sSL -X PUT "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X PUT "$endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GITLAB_TOKEN" \
-d "$payload" )
Expand Down
2 changes: 1 addition & 1 deletion src/gitlab/gl-pr-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function update_gitlab_pullrequest() {
endpoint="$pr_endpoint/$pr"

# Create the repository using curl
response=$(curl -sSL -X PATCH "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X PATCH "$endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GITLAB_TOKEN" \
-d "$payload" )
Expand Down
2 changes: 1 addition & 1 deletion src/gitlab/gl-repo-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function create_gitlab_repo() {
endpoint="https://gitlab.com/api/v4/projects"

# Create GitLab repository using curl
response=$(curl -sSL -X POST "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X POST "$endpoint" \
-H "Authorization: Bearer $GITLAB_TOKEN" \
-H "Content-Type: application/json" \
-d "$payload" )
Expand Down
2 changes: 1 addition & 1 deletion src/gitlab/gl-repo-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function delete_gitlab_repo() {

if [[ $confirmation =~ ^[Yy]$ ]]; then
# Delete the repository using curl
response=$(curl -sSL -X DELETE "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X DELETE "$endpoint" \
-H "Authorization: Bearer $GITLAB_TOKEN" )

echo "$response" | jq -r '.message'
Expand Down
2 changes: 1 addition & 1 deletion src/gitlab/gl-repo-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function edit_gitlab_repo() {
endpoint="https://gitlab.com/api/v4/projects/$OWNER$SLASH_ENCODED$REPO"

# Edit GitLab repository using curl
response=$(curl -sSL -X PUT "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L -X PUT "$endpoint" \
-H "Authorization: Bearer $GITLAB_TOKEN" \
-H "Content-Type: application/json" \
-d "$payload" )
Expand Down
2 changes: 1 addition & 1 deletion src/gitlab/gl-search-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function search_gitlab_repo() {
endpoint="https://gitlab.com/api/v4/search?scope=projects&search=$QUERY"

# CURL and jq
response=$(curl -s "$endpoint" \
response=$(curl --proto "=https" --tlsv1.2 -sSf -L "$endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GITLAB_TOKEN" \
| jq -r '.[] | "Name: \(.name), Description: \(.description), Web URL: \(.web_url)"' )
Expand Down
2 changes: 1 addition & 1 deletion src/utils/down_gitignore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function download_gitignore() {
gitignore_url="https://gitlab.com/api/v4/templates/gitignores/$language_name"

# Download `.gitignore` file
curl -sSL "$gitignore_url" | jq -r '.content' > .gitignore
curl --proto "=https" --tlsv1.2 -sSf -L "$gitignore_url" | jq -r '.content' > .gitignore
}


Expand Down
2 changes: 1 addition & 1 deletion src/utils/down_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function download_license() {
license_url="https://gitlab.com/api/v4/templates/licenses/$license_key?project=$repo_name&fullname=$license_holder"

# Download `LICENSE` file
curl -sSL "$license_url" | jq -r '.content' > LICENSE
curl --proto "=https" --tlsv1.2 -sSf -L "$license_url" | jq -r '.content' > LICENSE
}


Expand Down
Loading