mirror of
https://github.com/markwylde/claude-code-gitea-action.git
synced 2026-02-19 18:12:50 +08:00
fix: prioritize GITEA_SERVER_URL over GITHUB_SERVER_URL for custom Gitea instances
- Modified config.ts to check GITEA_SERVER_URL first, then fall back to GITHUB_SERVER_URL - Fixes issue where container-based Gitea instances generate internal URLs in comments - Added comprehensive test suite for URL configuration scenarios - Updated README.md with configuration documentation and examples - Added example workflow file for custom URL setup - Fixed TypeScript configuration to support Node.js globals Resolves issue #4: Enable GITEA_SERVER_URL environment variable override
This commit is contained in:
23
examples/gitea-custom-url.yml
Normal file
23
examples/gitea-custom-url.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Claude PR Review with Custom Gitea URL
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
claude-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Claude Code Analysis
|
||||
uses: markwylde/claude-code-gitea-action@gitea
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
|
||||
env:
|
||||
# Set this to your public Gitea URL to override the internal container URL
|
||||
# This ensures that links in comments point to the correct public URL
|
||||
GITEA_SERVER_URL: https://gitea.example.com
|
||||
|
||||
# Note: GITHUB_SERVER_URL is automatically set by Gitea Actions to the internal URL
|
||||
# but it will be overridden by GITEA_SERVER_URL if set above
|
||||
Reference in New Issue
Block a user