Skip to content

Commit

Permalink
change: update header - add option for single year license format
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mgoetzegb authored and greenbonebot committed Feb 10, 2025
1 parent 02d3583 commit d959aa0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion update-header/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit d959aa0

Please sign in to comment.