diff --git a/README.md b/README.md index 5f59793..64a0508 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,8 @@ jobs: | `description-prompt` | Path to description prompt file | No | Default prompt | | `write-mode` | Where to write descriptions (comma-separated list of: `title,comment,description` or `off` to disable) | No | `comment` | | `label-mode` | How to write labels (`add`, `set`, or `off`) | No | `add` | -| `footer` | Footer text used to identify and update relgen comments (should not be empty) | No | Default footer with link to action | +| `footer` | Footer text used to identify relgen comments | No | Default footer with link to action | +| `verbose` | Enable verbose logging | No | `false` | ## Customization diff --git a/action.yml b/action.yml index cd663b8..1bef4c7 100644 --- a/action.yml +++ b/action.yml @@ -25,7 +25,7 @@ inputs: description: 'Path to description prompt file' required: false footer: - description: 'Footer text used to identify and update relgen comments (should not be empty)' + description: 'Footer text used to identify relgen comments' default: | --- Generated by the [Relgen Action](https://github.com/zlalvani/relgen-action) @@ -37,6 +37,9 @@ inputs: label-mode: description: 'How to write labels (add, set, or off)' default: 'add' + verbose: + description: 'Enable verbose logging' + required: false runs: using: 'composite' @@ -54,9 +57,7 @@ runs: relgen remote pr describe "${{ github.event.pull_request.html_url }}" --provider ${{ inputs.llm-provider }} --model ${{ inputs.llm-model }} \ --write ${{ inputs.write-mode }} \ --llm-token ${{ inputs.llm-key }} \ - ${{ inputs.footer != '' && format('--footer "{0}"', inputs.footer) }} \ - ${{ inputs.description-template != '' && format('--template {0}', inputs.description-template) }} \ - ${{ inputs.description-prompt != '' && format('--prompt {0}', inputs.description-prompt) }} + ${{ inputs.footer != '' && format('--footer "{0}"', inputs.footer) || '' }} ${{ inputs.description-template != '' && format('--template {0}', inputs.description-template) || '' }} ${{ inputs.description-prompt != '' && format('--prompt {0}', inputs.description-prompt) || '' }} ${{ inputs.verbose == 'true' && '-v' || '' }} - name: Label PR if: inputs.label-mode != 'off' @@ -65,4 +66,4 @@ runs: GITHUB_TOKEN: ${{ inputs.github-token }} run: | relgen remote pr label "${{ github.event.pull_request.html_url }}" --provider ${{ inputs.llm-provider }} --model ${{ inputs.llm-model }} \ - --write ${{ inputs.label-mode }} --llm-token ${{ inputs.llm-key }} + --write ${{ inputs.label-mode }} --llm-token ${{ inputs.llm-key }} ${{ inputs.verbose == 'true' && '-v' || '' }}