From d959aa031ead61dea04b8a6015fa4c27724a2992 Mon Sep 17 00:00:00 2001 From: Marius Goetze Date: Thu, 6 Feb 2025 15:34:15 +0100 Subject: [PATCH] change: update header - add option for single year license format Having a single year instead of a year range eases the maintenance and noise in the git diff. The purpose of the action in this configuration is to spot missing license headers. --- update-header/action.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update-header/action.yaml b/update-header/action.yaml index ae1df059..3c1034ea 100644 --- a/update-header/action.yaml +++ b/update-header/action.yaml @@ -26,6 +26,10 @@ inputs: description: "Specify the license type'" default: "GPL-3.0-or-later" required: false + single-year: + description: "License header will contain only a single year instead of a range if set to 'true'" + default: "false" + required: false branding: icon: "package" @@ -57,7 +61,7 @@ runs: shell: bash - name: Run commands to update headers run: | - pontos-update-header -d ${{ inputs.directories }} -l ${{ inputs.license-type }} + pontos-update-header -d ${{ inputs.directories }} -l ${{ inputs.license-type }} ${{ (inputs.single-year == 'true' && '--single-year') || ''}} shell: bash - name: Commit changes and open a pull request run: |