commit cd036bd2279af15f52c0c7b0ce0511fc4e8e489e Author: Nikolay Buslaev Date: Tue Mar 10 10:34:37 2026 +0100 first commit diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..eb6efa5 --- /dev/null +++ b/action.yml @@ -0,0 +1,48 @@ +name: 'Claude Code AI Assistant for Gitea - Reusable Action' +description: 'Wyn team-specific Code AI Assistant for reviewing pull-requests and responding to issues in Gitea repositories' + +inputs: + gitea_token: + description: 'Gitea token for authentication' + required: true + anthropic_api_key: + description: 'Anthropic API key' + required: true + model: + description: 'Claude model to use' + required: false + default: '/int/reviewer/default' + +runs: + using: 'composite' + steps: + - name: Check condition + id: check + shell: bash + run: | + [[ "${{ github.event_name }}" == "pull_request" && "${{ contains(github.event.pull_request.title, '[no ai]') }}" == "false" ]] || \ + [[ "${{ github.event_name }}" == "issues" && "${{ contains(github.event.issue.body, '@claude') }}" == "true" ]] || \ + [[ "${{ github.event_name }}" == "issue_comment" && "${{ contains(github.event.comment.body, '@claude') }}" == "true" ]] && \ + echo "run=true" >> $GITHUB_OUTPUT || echo "run=false" >> $GITHUB_OUTPUT + + - name: Setup Repository Context + uses: actions/checkout@v4 + if: steps.check.outputs.run == 'true' + with: + fetch-depth: 0 + + - name: Run Code Review + if: steps.check.outputs.run == 'true' + shell: bash + run: /pipe.sh + env: + CC_BASE_URL: https://llm.developertools.pro + CC_API_KEY: ${{ inputs.anthropic_api_key }} + CC_MODEL: ${{ inputs.model }} + VCS_ACCESS_TOKEN: ${{ inputs.gitea_token }} + SERVER: "https://code.wynenterprise.io" + TEAM_NAME: "Wyn" + +branding: + icon: 'message-circle' + color: 'blue'