58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
name: "PR Commenter (GitHub/Gitea Compatible)"
|
|
description: "Posts PR comments to GitHub or Gitea, supporting diffs or large file inputs (plans, logs, etc.)."
|
|
author: "Trez.One / AlexNorell (adapted for Gitea)"
|
|
|
|
inputs:
|
|
platform:
|
|
description: "Target platform: github or gitea"
|
|
required: false
|
|
default: "github"
|
|
token:
|
|
description: "Auth token for GitHub or Gitea API"
|
|
required: true
|
|
repo_name:
|
|
description: "Repository name (defaults to GITHUB_REPOSITORY)"
|
|
required: false
|
|
repo_owner:
|
|
description: "Repository owner (defaults to GITHUB_REPOSITORY_OWNER)"
|
|
required: false
|
|
api_url:
|
|
description: "API base URL (required for Gitea)"
|
|
required: false
|
|
pr_index:
|
|
description: "Pull request index or number"
|
|
required: true
|
|
plan_file:
|
|
description: "Path to file containing large plan/log content"
|
|
required: false
|
|
comment_template:
|
|
description: "Template for comment body (supports {line} and {lines})"
|
|
required: false
|
|
default: |
|
|
🚀 **Automated Comment**
|
|
---
|
|
{lines}
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install Python dependencies
|
|
shell: bash
|
|
run: |
|
|
python3 -m pip install --upgrade pip
|
|
python3 -m pip install -r ${GITHUB_WORKSPACE}/requirements.txt
|
|
|
|
- name: Run git-auto-comment
|
|
shell: bash
|
|
run: |
|
|
python3 ${GITHUB_WORKSPACE}/git-auto-comment.py
|
|
env:
|
|
PLATFORM: ${{ inputs.platform }}
|
|
TOKEN: ${{ inputs.token }}
|
|
REPO_NAME: ${{ inputs.repo_name }}
|
|
REPO_OWNER: ${{ inputs.repo_owner }}
|
|
API_URL: ${{ inputs.api_url }}
|
|
PR_INDEX: ${{ inputs.pr_index }}
|
|
PLAN_FILE: ${{ inputs.plan_file }}
|
|
COMMENT_TEMPLATE: ${{ inputs.comment_template }}
|