Eureka! Sort of (had to fix references further down).
This commit is contained in:
@@ -53,27 +53,6 @@ jobs:
|
||||
echo "Error checking for existing PR. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
# if [ $(echo ${pr_check} | jq -r '.state') == '"open"' ]; then
|
||||
# echo "PR already exists. PR number: $(echo ${pr_check} | jq -r '.state')"
|
||||
# echo "pr_index=$(echo ${pr_check} | jq -r '.index')" >> "$GITHUB_ENV"
|
||||
# elif [ $(echo ${pr_check} | jq -r ''.state') == '"closed"' ]; then
|
||||
# echo "PR does not exist. Creating PR..."
|
||||
# echo "Creating PR..."
|
||||
# pr_response=$(curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls -s \
|
||||
# -X 'POST' \
|
||||
# -H 'Accept: application/json' \
|
||||
# -H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
||||
# -H 'Content-Type: application/json' \
|
||||
# -d '{
|
||||
# "title": "PR: ${{ github.ref_name }} -> main",
|
||||
# "body": "This is an automated PR created by Gitea Actions.",
|
||||
# "base": "main",
|
||||
# "head": "${{ github.ref_name }}"
|
||||
# }')
|
||||
# pr_index=$(echo "$pr_response" | jq -r '.number')
|
||||
# echo "PR created. PR number: $pr_index"
|
||||
# echo "pr_index=$pr_index" >> "$GITHUB_ENV"
|
||||
# fi
|
||||
|
||||
sonarqube-analysis:
|
||||
name: SonarQube Analysis
|
||||
@@ -140,7 +119,7 @@ jobs:
|
||||
|
||||
- name: Post SonarQube Results as Comment
|
||||
run: |
|
||||
curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${{ env.pr_index }}/reviews \
|
||||
curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${{ steps.cc-pr.outputs.pr_index }}/reviews \
|
||||
-X POST \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
||||
|
||||
Reference in New Issue
Block a user