Skip to content

Commit 0a69aac

Browse files
authored
Merge pull request #24 from Telefonica/release
chore: Install tools to check open source (#23)
2 parents f6633b5 + 0677305 commit 0a69aac

File tree

14 files changed

+202
-2
lines changed

14 files changed

+202
-2
lines changed

.github/CLA.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Grant of Patent License. Subject to the terms and conditions of this Agreement,
3434

3535
You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that you will have received permission from your current and future employers for all future Contributions, that your applicable employer has waived such rights for all of your current and future Contributions to Telefónica Innovación Digital, or that your employer has executed a separate Corporate CLA with Telefónica Innovación Digital.
3636

37+
You represent that each of Your Contributions is Your original creation. You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.
38+
3739
You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
3840

3941
You agree to notify Telefónica Innovación Digital of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Add your title here
1+
# <!-- Add your title here -->
22

33
## Description
44

5-
__Please provide enough information and context so that others can review your pull request easily__
5+
<!-- __Please provide enough information and context so that others can review your pull request easily__ -->
66

77
## Agreement
88

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# SPDX-FileCopyrightText: 2025 Telefónica Innovación Digital and contributors
2+
# SPDX-License-Identifier: MIT
3+
4+
licenses:
5+
allowed:
6+
- Apache-2.0
7+
- MIT
8+
- X11
9+
- BSD-2-Clause
10+
- BSD-3-Clause
11+
- ISC
12+
- Zlib
13+
- Unlicense
14+
- 0BSD
15+
- BlueOak-1.0.0
16+
- WTFPL
17+
- CC-BY-3.0
18+
- CC-BY-4.0
19+
- CC0-1.0
20+
- Python-2.0
21+
warning:
22+
- CC-BY-SA-3.0
23+
- CC-BY-SA-4.0
24+
- LGPL-2.1
25+
- LGPL-2.1-only
26+
- LGPL-2.1+
27+
- LGPL-2.1-or-later
28+
- LGPL-3.0
29+
- LGPL-3.0-only
30+
- LGPL-3.0+
31+
- LGPL-3.0-or-later
32+
- MPL-1.1
33+
- MPL-2.0
34+
- EPL-1.0
35+
forbidden:
36+
- GPL-2.0-only
37+
- GPL-2.0-or-later
38+
- GPL-3.0-only
39+
- GPL-3.0-or-later
40+
- AGPL-3.0
41+
npm:
42+
excludeModules:
43+
- "@tid-xcut/[email protected]"
44+
45+
# production: true # Whether to check production dependencies or not
46+
# development: true # Whether to check development dependencies or not
47+
# onlyDirect: false # Whether to check only direct dependencies or not
48+
# npm: # Configuration for npm dependencies
49+
# includeFiles: # Files to include in the check
50+
# - "**/package.json"
51+
# excludeFiles: # Files to exclude from the check
52+
# - "**/node_modules/**"
53+
# developmentFiles: # Dependencies in these files are considered development dependencies
54+
# - "**/my-dev-package/package.json"
55+
# modules: # Only check these modules
56+
57+
# excludeModules: # Exclude these modules from the check
58+
59+
# extraModules: # Add these extra modules to the check
60+
61+
# python: # Configuration for python dependencies, similar to npm, plus extra options
62+
# recursiveRequirements: true # Whether to check requirements recursively, including -r files
63+
# maven: {} # Configuration for maven dependencies, similar to npm
64+
# go: {} # Configuration for go dependencies, similar to npm
65+
# reporter: text # Reporter to use (text, json, markdown)
66+
# failOnNotValid: true # Whether to fail the action if a dependency is forbidden
67+
# log: info # Log level (silly, debug, verbose, info, warn, error)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-FileCopyrightText: 2025 Telefónica Innovación Digital and contributors
2+
# SPDX-License-Identifier: MIT
3+
4+
rules:
5+
- name: "Source code"
6+
headers:
7+
- files:
8+
- "**/*.js"
9+
- "**/*.ts"
10+
- "src/**"
11+
license: "Apache-2.0"
12+
ignore:
13+
- "*.config.js"
14+
- "script/**"
15+
- name: "Config files"
16+
headers:
17+
- files:
18+
- ".github/**/*.yml"
19+
- "**/*.yml"
20+
- "*.config.js"
21+
license:
22+
- "MIT"
23+
- "Apache-2.0"
24+
- name: "Scripts"
25+
headers:
26+
- files:
27+
- "script/**"
28+
license:
29+
- "MIT"
30+
- "Apache-2.0"
31+
- name: "Copyright"
32+
headers:
33+
- files:
34+
- ".github/**/*.yml"
35+
- "src/**"
36+
- "**/*.yml"
37+
copyright:
38+
- "\\d{4}(\\s-\\s\\d{4})? Telefónica Innovación Digital"
39+
- "\\d{4}(\\s-\\s\\d{4})? Telefónica Innovación Digital and contributors"
40+
ignore:
41+
- "**/node_modules/**"
42+
- "dist/**"
43+
- "build/**"
44+
- "coverage/**"
45+
- ".github/ISSUE_TEMPLATE/**"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-FileCopyrightText: 2025 Telefónica Innovación Digital and contributors
2+
# SPDX-License-Identifier: MIT
3+
4+
name: Open Source Checks
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- main
10+
- release
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
statuses: write
20+
21+
jobs:
22+
check-opensource-scaffold:
23+
name: Check Open Source Scaffold
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout
28+
id: checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Check Open Source Scaffold
32+
uses: Telefonica/opensource-scaffold@v1
33+
34+
check-license-compliance:
35+
name: Check License Compliance
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- name: Check License Compliance
42+
uses: Telefonica/check-license-compliance/.github/actions/[email protected]
43+
with:
44+
config-file: .github/check-license-compliance.config.yml
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
check-spdx-headers:
49+
name: Check SPDX Headers
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- name: Checkout
54+
id: checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Check SPDX Headers
58+
uses: Telefonica/check-spdx-headers/.github/actions/check-and-comment@v1
59+
with:
60+
config-file: .github/check-spdx-headers.config.yml
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cspell/missing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
commonmark
22
frontmatter
3+
opensource
34
syncrc

jest.e2e.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: 2024 Telefónica Innovación Digital and contributors
2+
// SPDX-License-Identifier: MIT
3+
14
/** @type {import('ts-jest').JestConfigWithTsJest} **/
25
export default {
36
// Automatically clear mock calls and instances between every test

jest.unit.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: 2024 Telefónica Innovación Digital and contributors
2+
// SPDX-License-Identifier: MIT
3+
14
/** @type {import('ts-jest').JestConfigWithTsJest} **/
25
export default {
36
// Automatically clear mock calls and instances between every test

script/post-package.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: 2024 Telefónica Innovación Digital and contributors
2+
// SPDX-License-Identifier: MIT
3+
14
import { replaceInFile } from "replace-in-file";
25

36
const filePath = "dist/index.js";

script/release

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-License-Identifier: MIT
2+
13
#!/bin/bash
24

35
# Exit early

0 commit comments

Comments
 (0)