use gitea api with curl
Some checks failed
CI / build-and-test (push) Failing after 2m37s

This commit is contained in:
Tobias Klemp
2026-01-01 23:53:25 +01:00
parent da4952aaa6
commit 2f79f0c4fe

View File

@@ -18,7 +18,9 @@ runs:
PR_URL="${{ github.event.issue.pull_request.url }}" PR_URL="${{ github.event.issue.pull_request.url }}"
# Extract PR info using curl (Gitea API is similar to GitHub) # Extract PR info using curl (Gitea API is similar to GitHub)
PR_INFO=$(curl -s -H "Authorization: token ${{ github.token }}" "$PR_URL") PR_INFO=$(curl -s -H "Authorization: token ${{ gitea.token }}" "${{ gitea.api_url }}/repos/${{ gitea.repository }}/pulls/${{ gitea.event.issue.number }}")
echo "$PR_INFO"
# Extract branch name from JSON response # Extract branch name from JSON response
BRANCH_NAME=$(echo "$PR_INFO" | jq -r '.head.ref') BRANCH_NAME=$(echo "$PR_INFO" | jq -r '.head.ref')