Skip to content

Commit

Permalink
feat: verbose option (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlalvani authored Jan 17, 2025
1 parent 41ac796 commit ed79a97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 6 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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' || '' }}

0 comments on commit ed79a97

Please sign in to comment.