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 .github/workflows/gh-pr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Execute Code Review
uses: ws2git/code-scout@v1
uses: ws2git/code-scout@f2d52cf795a29cd9e18a6f84c2d74ec95c4da92b
with:
pull_request_url: ${{ github.event.inputs.pull_request_url }}
event: ${{ github.event.inputs.review_event }}
Expand Down
2 changes: 2 additions & 0 deletions src/bitbucket/bb-pr-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ function create_bitbucket_pullrequest() {

# Check if there are erros
echo "$response" #| jq -r '.iid // .message'

return 0
}

create_bitbucket_pullrequest "$1" "$2"
2 changes: 2 additions & 0 deletions src/bitbucket/bb-pr-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ function create_bitbucket_pullrequest() {

# Check if there are erros
echo "$response" #| jq -r '.iid // .message'

return 0
}

create_bitbucket_pullrequest "$1" "$2" "$3"
2 changes: 2 additions & 0 deletions src/bitbucket/bb-pr-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ function update_bitbucket_pullrequest() {

# Check if there are erros
echo "$response" #| jq -r '.iid // .message'

return 0
}

update_bitbucket_pullrequest "$1" "$2" "$3"
2 changes: 2 additions & 0 deletions src/bitbucket/bb-repo-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function create_bitbucket_repo() {

# Check for successful creation
echo "$response" | jq -r '.error.message // (.links.clone[] | select(.name == "ssh") | .href)'

return 0
}


Expand Down
1 change: 1 addition & 0 deletions src/bitbucket/bb-repo-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function delete_bitbucket_repo() {
echo "Deletion cancelled."
fi

return 0
}


Expand Down
2 changes: 2 additions & 0 deletions src/bitbucket/bb-repo-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function edit_bitbucket_repo() {

# Check if there are errors
echo "$response" | jq -r '.error.message'

return 0
}


Expand Down
3 changes: 2 additions & 1 deletion src/github/gh-notification-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ function delete_github_notifications() {
-H "X-GitHub-Api-Version: 2022-11-28" )

echo "$response"


return 0
}

delete_github_notifications "$1"
3 changes: 2 additions & 1 deletion src/github/gh-notification-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function list_github_notifications() {
echo "$response" > "$tmp_file"
less "$tmp_file"
rm "$tmp_file"


return 0
}

list_github_notifications
2 changes: 2 additions & 0 deletions src/github/gh-pr-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ function create_github_pullrequest() {

# Check if there are erros
echo "$response" | jq -r '.number // .message'

return 0
}

create_github_pullrequest "$1" "$2"
2 changes: 2 additions & 0 deletions src/github/gh-pr-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ function merge_github_pullrequest() {

# Check if there are erros
echo "$response" #| jq -r '.number // .message'

return 0
}

merge_github_pullrequest "$1" "$2" "$3"
2 changes: 2 additions & 0 deletions src/github/gh-pr-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ function update_github_pullrequest() {

# Check if there are erros
echo "$response" | jq -r '.number // .message'

return 0
}

update_github_pullrequest "$1" "$2" "$3"
2 changes: 2 additions & 0 deletions src/github/gh-repo-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function create_github_repo() {

# Check if there are erros
echo "$response" | jq -r '.ssh_url // .message'

return 0
}


Expand Down
2 changes: 2 additions & 0 deletions src/github/gh-repo-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ function delete_github_repo() {
else
echo "Deletion cancelled."
fi

return 0
}


Expand Down
2 changes: 2 additions & 0 deletions src/github/gh-repo-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ function edit_github_repo() {

# Check if there are erros
echo "$response" | jq -r '.message'

return 0
}


Expand Down
3 changes: 2 additions & 1 deletion src/github/gh-repo-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ function list_github_repo() {

less "$tmp_file"
rm "$tmp_file"


return 0
}

list_github_repo
3 changes: 2 additions & 1 deletion src/github/gh-search-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ function search_github_repo() {
echo "$response" > "$tmp_file"
less "$tmp_file"
rm "$tmp_file"


return 0
}

search_github_repo "$1"
Expand Down
2 changes: 2 additions & 0 deletions src/gitlab/gl-pr-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ function create_gitlab_pullrequest() {

# Check if there are erros
echo "$response" | jq -r '.iid // .message'

return 0
}

create_gitlab_pullrequest "$1" "$2"
Expand Down
2 changes: 2 additions & 0 deletions src/gitlab/gl-pr-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ function merge_gitlab_pullrequest() {

# Check if there are erros
echo "$response" #| jq -r '.number // .message'

return 0
}

merge_gitlab_pullrequest "$1" "$2" "$3"
2 changes: 2 additions & 0 deletions src/gitlab/gl-pr-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ function update_gitlab_pullrequest() {

# Check if there are erros
echo "$response" | jq -r '.number // .message'

return 0
}

update_gitlab_pullrequest "$1" "$2" "$3"
2 changes: 2 additions & 0 deletions src/gitlab/gl-repo-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ function create_gitlab_repo() {

# Check if there are erros
echo "$response" | jq -r '.ssh_url_to_repo // .message'

return 0
}


Expand Down
1 change: 1 addition & 0 deletions src/gitlab/gl-repo-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function delete_gitlab_repo() {
echo "Deletion cancelled."
fi

return 0
}


Expand Down
2 changes: 2 additions & 0 deletions src/gitlab/gl-repo-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ function edit_gitlab_repo() {

# Check if there are erros
echo "$response" | jq -r '.message'

return 0
}


Expand Down
3 changes: 2 additions & 1 deletion src/gitlab/gl-search-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function search_gitlab_repo() {
echo "$response" > "$tmp_file"
less "$tmp_file"
rm "$tmp_file"


return 0
}

search_gitlab_repo "$1"
2 changes: 2 additions & 0 deletions src/gitnap/gn-init-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function initialize_git_repo() {

# TODO: select and set remote to push


return 0
}


Expand Down
2 changes: 2 additions & 0 deletions src/utils/down_gitignore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ function download_gitignore() {

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

return 0
}


Expand Down
4 changes: 3 additions & 1 deletion src/utils/down_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function download_license() {
# Checks if the parameter was provided
if [[ -z "$license_key" ]]; then
echo "Which is the license key?"
curl -sSL "https://gitlab.com/api/v4/templates/licenses" | jq -r '.[].key'
curl --proto "=https" --tlsv1.2 -sSf -L "https://gitlab.com/api/v4/templates/licenses" | jq -r '.[].key'
exit 1
fi

Expand All @@ -29,6 +29,8 @@ function download_license() {

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

return 0
}


Expand Down
6 changes: 6 additions & 0 deletions src/utils/endpoints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ function build_bb_endpoint() {
esac

echo "$endpoint"

return 0
}


Expand Down Expand Up @@ -75,6 +77,8 @@ function build_gh_endpoint() {
esac

echo "$endpoint"

return 0
}


Expand Down Expand Up @@ -110,4 +114,6 @@ function build_gl_endpoint() {
esac

echo "$endpoint"

return 0
}
3 changes: 2 additions & 1 deletion src/utils/format_pullrequest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ function format_pullrequest() {

# Retorna o conteúdo formatado
echo "$escaped_content"


return 0
}
Loading