Migrate all action files to use the new Gitea server URL. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Comment on PR
|
|
description: Add a comment to a pull request via Forgejo API
|
|
|
|
inputs:
|
|
token:
|
|
description: Forgejo API token
|
|
required: true
|
|
repository:
|
|
description: Repository (owner/repo)
|
|
default: ${{ github.repository }}
|
|
pr-number:
|
|
description: Pull request number
|
|
required: true
|
|
body:
|
|
description: Comment body
|
|
required: true
|
|
|
|
outputs:
|
|
id:
|
|
description: Created comment ID
|
|
value: ${{ steps.comment.outputs.id }}
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- id: comment
|
|
shell: bash
|
|
run: |
|
|
TOKEN="${{ inputs.token }}"
|
|
REPO="${{ inputs.repository }}"
|
|
PR_NUMBER="${{ inputs.pr-number }}"
|
|
BODY="${{ inputs.body }}"
|
|
|
|
JSON=$(jq -n --arg body "$BODY" '{body: $body}')
|
|
|
|
RESPONSE=$(curl -s -X POST \
|
|
"https://git.flowmade.one/api/v1/repos/$REPO/issues/$PR_NUMBER/comments" \
|
|
-H "Authorization: token $TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d "$JSON")
|
|
|
|
ID=$(echo "$RESPONSE" | jq -r '.id')
|
|
echo "id=$ID" >> $GITHUB_OUTPUT
|