From e0f02766055c3c42814215e01b571149a514f9c4 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 1 Jan 2026 15:06:07 -0500 Subject: [PATCH] OpenCommit workflow. --- .gitea/workflows/opencommit.yml | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .gitea/workflows/opencommit.yml diff --git a/.gitea/workflows/opencommit.yml b/.gitea/workflows/opencommit.yml new file mode 100644 index 0000000..c245ae4 --- /dev/null +++ b/.gitea/workflows/opencommit.yml @@ -0,0 +1,49 @@ +name: OpenCommit — Improve AI Commit Messages + +on: + push: + branches: + - '**' + +jobs: + improve-commit-messages: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Improve commit messages with OpenCommit + uses: https://git.trez.wtf/Trez/opencommit-gitea@main + with: + GITHUB_TOKEN: ${{ secrets.BOT_GITEA_TOKEN }} + GIT_PLATFORM: 'gitea' + GIT_PLATFORM_API_BASE: ${{ secrets.TREZ_GITEA_URL }} + + env: + # === Required AI credentials === + OCO_API_URL: ${{ secrets.OLLAMA_API_URL }} # Optional custom API URL + + # === Model & provider configuration === + OCO_AI_PROVIDER: 'ollama' # openai, azure, ollama, flowise, etc. + OCO_MODEL: 'qwen3-coder:latest' # model name + OCO_TOKENS_MAX_INPUT: '4096' # model input token limit + OCO_TOKENS_MAX_OUTPUT: '500' # model output token cap + + # === Commit message behavior === + OCO_DESCRIPTION: 'true' # long description included + OCO_EMOJI: 'true' # include emojis + OCO_LANGUAGE: 'en' # output language + OCO_MESSAGE_TEMPLATE_PLACEHOLDER: '$msg' # template placeholder override + OCO_PROMPT_MODULE: 'conventional-commit' # msg style module + OCO_ONE_LINE_COMMIT: 'false' # only one-line messages + + # === Optional generation flags === + OCO_WHY: 'false' # output “why” explanation (WIP)