From d6ab3c936c125e32ca505a37967b471bbaf4ab50 Mon Sep 17 00:00:00 2001 From: Harish P Date: Thu, 4 Sep 2025 14:03:13 +0530 Subject: [PATCH 1/5] Updated header for the license header PR --- .github/workflows/license-checker.yaml | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/license-checker.yaml diff --git a/.github/workflows/license-checker.yaml b/.github/workflows/license-checker.yaml new file mode 100644 index 00000000..089dfbdf --- /dev/null +++ b/.github/workflows/license-checker.yaml @@ -0,0 +1,40 @@ +name: Weekly License Header Check + +on: + workflow_call: + inputs: + file-exclusions-list: + description: "Autofix mode" + required: false + type: string +jobs: + license-check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.CSM_GPG_PRIVATE_KEY }} + git_user_signingkey: true + git_commit_gpgsign: true + git_tag_gpgsign: true + git_config_global: true + + - name: Run License Header Checker + uses: dell/common-github-actions/license-checker@main + with: + autofix: true + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: autofix/license-header + commit-message: "License header autofix" + title: "Automated PR for License header fix" + body: "This PR was created automatically by the License header check github action to fix the license header issues in this repository." + sign-commits: true + delete-branch: false From 5f9be57f849eb77bf9104b6f3b2b60ffdcd061ce Mon Sep 17 00:00:00 2001 From: Harish P Date: Thu, 4 Sep 2025 14:08:13 +0530 Subject: [PATCH 2/5] updated input variable --- .github/workflows/license-checker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/license-checker.yaml b/.github/workflows/license-checker.yaml index 089dfbdf..b1a36e6e 100644 --- a/.github/workflows/license-checker.yaml +++ b/.github/workflows/license-checker.yaml @@ -4,7 +4,7 @@ on: workflow_call: inputs: file-exclusions-list: - description: "Autofix mode" + description: "file-exclusions-list" required: false type: string jobs: From a74d0c99e6bc7beab6e66e540fbe57114f371fb0 Mon Sep 17 00:00:00 2001 From: Harish P Date: Thu, 4 Sep 2025 20:40:34 +0530 Subject: [PATCH 3/5] Fixed review comments --- .github/workflows/license-checker.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/license-checker.yaml b/.github/workflows/license-checker.yaml index b1a36e6e..d8497250 100644 --- a/.github/workflows/license-checker.yaml +++ b/.github/workflows/license-checker.yaml @@ -1,10 +1,18 @@ +# Copyright (c) 2025 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 + name: Weekly License Header Check on: workflow_call: inputs: file-exclusions-list: - description: "file-exclusions-list" + description: "Files or folders to exclude from license header checks" required: false type: string jobs: @@ -27,6 +35,7 @@ jobs: uses: dell/common-github-actions/license-checker@main with: autofix: true + exclude-files: ${{ inputs.file-exclusions-list }} - name: Create Pull Request uses: peter-evans/create-pull-request@v7 @@ -34,7 +43,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} branch: autofix/license-header commit-message: "License header autofix" - title: "Automated PR for License header fix" - body: "This PR was created automatically by the License header check github action to fix the license header issues in this repository." + title: "Fix license header inconsistencies" + body: "This PR standardizes license headers across applicable files by adding missing licenses and fixing formatting issues.Auto-generated by common-github-actions" sign-commits: true delete-branch: false From 11f7f4bddb21cbb19a58739b80d6b130da048573 Mon Sep 17 00:00:00 2001 From: Harish P Date: Thu, 4 Sep 2025 20:45:28 +0530 Subject: [PATCH 4/5] Updated missing files exclusion in the action --- license-checker/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/license-checker/action.yml b/license-checker/action.yml index 755a754c..c7dadafb 100644 --- a/license-checker/action.yml +++ b/license-checker/action.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 + name: "License Header Checker" description: "Checks for license header" @@ -14,3 +22,4 @@ runs: image: "Dockerfile" args: - ${{ inputs.autofix }} + - ${{ inputs.exclude-files }} From 86d82a23f3497594c734217d51c72afa576fffcc Mon Sep 17 00:00:00 2001 From: Harish P Date: Thu, 4 Sep 2025 21:04:29 +0530 Subject: [PATCH 5/5] Fixed review comments --- .github/workflows/license-checker.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/license-checker.yaml b/.github/workflows/license-checker.yaml index d8497250..d0019a89 100644 --- a/.github/workflows/license-checker.yaml +++ b/.github/workflows/license-checker.yaml @@ -44,6 +44,8 @@ jobs: branch: autofix/license-header commit-message: "License header autofix" title: "Fix license header inconsistencies" - body: "This PR standardizes license headers across applicable files by adding missing licenses and fixing formatting issues.Auto-generated by common-github-actions" + body: | + This PR standardizes license headers across applicable files by adding missing licenses and fixing formatting issues. + Auto-generated by [common-github-actions](https://github.com/dell/common-github-actions) sign-commits: true delete-branch: false