diff --git a/action.yml b/action.yml index eb6efa5..a2c63e1 100644 --- a/action.yml +++ b/action.yml @@ -1,17 +1,83 @@ 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: + # Required gitea_token: description: 'Gitea token for authentication' required: true anthropic_api_key: description: 'Anthropic API key' required: true + cc_base_url: + description: 'Base URL for the Claude API endpoint' + required: true + team_name: + description: 'Team name for telemetry/metrics attribution' + required: true + # Optional - model model: description: 'Claude model to use' required: false default: '/int/reviewer/default' + # Optional - review behavior + enable_reviewer_verification: + description: 'Whether to verify that the bot is assigned as a reviewer before running' + required: false + default: 'true' + log_level: + description: 'Log level for the AI review process' + required: false + default: '' + options_type: + description: 'Options type for the AI review process' + required: false + default: '' + cc_prompt: + description: 'Custom prompt override for the AI review' + required: false + default: '' + cc_allowed_tool: + description: 'Comma-separated list of allowed tools for the AI review' + required: false + default: '' + cc_disallowed_tool: + description: 'Comma-separated list of disallowed tools for the AI review' + required: false + default: '' + # Optional - Gitea/repo context overrides + server: + description: 'Gitea server URL' + required: false + default: 'https://code.wynenterprise.io' + repo_owner: + description: 'Repository owner (defaults to GITHUB_REPOSITORY owner)' + required: false + default: '' + repo_slug: + description: 'Repository slug/name (defaults to GITHUB_REPOSITORY name)' + required: false + default: '' + # Optional - PR context overrides + source_branch: + description: 'Source branch override (defaults to GITHUB_HEAD_REF)' + required: false + default: '' + source_commit: + description: 'Source commit SHA override' + required: false + default: '' + pr_id: + description: 'Pull Request ID override' + required: false + default: '' + pr_destination_branch: + description: 'PR destination/target branch override' + required: false + default: '' + pr_destination_commit: + description: 'PR destination commit SHA override' + required: false + default: '' runs: using: 'composite' @@ -27,22 +93,34 @@ runs: - 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_BASE_URL: ${{ inputs.cc_base_url }} 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" + TEAM_NAME: ${{ inputs.team_name }} + SERVER: ${{ inputs.server }} + ENABLE_REVIEWER_VERIFICATION: ${{ inputs.enable_reviewer_verification }} + LOG_LEVEL: ${{ inputs.log_level }} + OPTIONS_TYPE: ${{ inputs.options_type }} + CC_PROMPT: ${{ inputs.cc_prompt }} + CC_ALLOWED_TOOL: ${{ inputs.cc_allowed_tool }} + CC_DISALLOWED_TOOL: ${{ inputs.cc_disallowed_tool }} + REPO_OWNER: ${{ inputs.repo_owner }} + REPO_SLUG: ${{ inputs.repo_slug }} + SOURCE_BRANCH: ${{ inputs.source_branch }} + SOURCE_COMMIT: ${{ inputs.source_commit }} + PR_ID: ${{ inputs.pr_id }} + PR_DESTINATION_BRANCH: ${{ inputs.pr_destination_branch }} + PR_DESTINATION_COMMIT: ${{ inputs.pr_destination_commit }} + run: /pipe.sh branding: icon: 'message-circle' - color: 'blue' + color: 'blue' \ No newline at end of file