diff --git a/.github/workflows/license-header.yml b/.github/workflows/license-header.yml new file mode 100644 index 00000000..8107ee8f --- /dev/null +++ b/.github/workflows/license-header.yml @@ -0,0 +1,26 @@ +name: License Header + +on: + pull_request: + branches: [main] + paths: + - "**/*.go" + - "**/*.js" + - "**/*.py" + - .licenserc.yaml + - .github/workflows/license-header.yml + +permissions: + contents: read + pull-requests: write + +jobs: + header-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Check license headers + uses: apache/skywalking-eyes/header@8c96ee223558797cdd9eba82c0919258e1cf2dad + with: + config: .licenserc.yaml diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 00000000..d9e23774 --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,16 @@ +header: + license: + content: | + Copyright (c) [year] Lark Technologies Pte. Ltd. + SPDX-License-Identifier: MIT + copyright-year: "2026" + + paths: + - '**/*.go' + - '**/*.js' + - '**/*.py' + + paths-ignore: + - '**/testdata/**' + + comment: on-failure diff --git a/internal/auth/auth_response_log.go b/internal/auth/auth_response_log.go index 0695027e..b57a9eda 100644 --- a/internal/auth/auth_response_log.go +++ b/internal/auth/auth_response_log.go @@ -1,3 +1,6 @@ +// Copyright (c) 2026 Lark Technologies Pte. Ltd. +// SPDX-License-Identifier: MIT + package auth import ( diff --git a/internal/keychain/auth_log.go b/internal/keychain/auth_log.go index 64558bd9..4d1ac2f3 100644 --- a/internal/keychain/auth_log.go +++ b/internal/keychain/auth_log.go @@ -1,3 +1,6 @@ +// Copyright (c) 2026 Lark Technologies Pte. Ltd. +// SPDX-License-Identifier: MIT + package keychain import ( diff --git a/scripts/install.js b/scripts/install.js index 3393840f..3a3b1ecc 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -1,3 +1,6 @@ +// Copyright (c) 2026 Lark Technologies Pte. Ltd. +// SPDX-License-Identifier: MIT + const fs = require("fs"); const path = require("path"); const { execSync } = require("child_process"); diff --git a/scripts/pr-labels/test.js b/scripts/pr-labels/test.js index db08ddc1..7317d1b8 100644 --- a/scripts/pr-labels/test.js +++ b/scripts/pr-labels/test.js @@ -1,3 +1,6 @@ +// Copyright (c) 2026 Lark Technologies Pte. Ltd. +// SPDX-License-Identifier: MIT + const fs = require('fs'); const { execFileSync } = require('child_process'); const path = require('path'); diff --git a/scripts/run.js b/scripts/run.js index 1b2477e8..5e4f053a 100644 --- a/scripts/run.js +++ b/scripts/run.js @@ -1,4 +1,7 @@ #!/usr/bin/env node +// Copyright (c) 2026 Lark Technologies Pte. Ltd. +// SPDX-License-Identifier: MIT + const { execFileSync } = require("child_process"); const path = require("path"); diff --git a/scripts/skill-format-check/index.js b/scripts/skill-format-check/index.js index 71b14f00..169ff3a7 100644 --- a/scripts/skill-format-check/index.js +++ b/scripts/skill-format-check/index.js @@ -1,3 +1,6 @@ +// Copyright (c) 2026 Lark Technologies Pte. Ltd. +// SPDX-License-Identifier: MIT + const fs = require('fs'); const path = require('path');