From 82662f7299bc0728bd7b36cabdceb930152f807d Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Wed, 7 Oct 2026 12:39:48 -0700 Subject: [PATCH 1/2] chore: add copyright to all scripts in the repo As suggested in https://github.com/open-telemetry/community/pull/3745#pullrequestreview-5444725059 Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- scripts/baremetal-runner-report.py | 3 ++ .../convert-voter-roll-to-helios.py | 5 +++ .../gc-elections/create-github-comments.py | 5 +++ scripts/gc-elections/generate-voters-roll.py | 5 +++ scripts/move-to-emeritus.py | 33 +++++++++++-------- scripts/update-community-members.py | 4 +++ scripts/update-sig-tables.py | 3 ++ scripts/validate-workstreams.py | 4 +++ 8 files changed, 48 insertions(+), 14 deletions(-) diff --git a/scripts/baremetal-runner-report.py b/scripts/baremetal-runner-report.py index 481f452ed..945da5d72 100644 --- a/scripts/baremetal-runner-report.py +++ b/scripts/baremetal-runner-report.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 """ Bare-metal benchmark runner usage report. diff --git a/scripts/gc-elections/convert-voter-roll-to-helios.py b/scripts/gc-elections/convert-voter-roll-to-helios.py index a031c510c..7df210dee 100644 --- a/scripts/gc-elections/convert-voter-roll-to-helios.py +++ b/scripts/gc-elections/convert-voter-roll-to-helios.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 +# +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# import csv import os diff --git a/scripts/gc-elections/create-github-comments.py b/scripts/gc-elections/create-github-comments.py index 1461059fd..b1435b0d8 100644 --- a/scripts/gc-elections/create-github-comments.py +++ b/scripts/gc-elections/create-github-comments.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 +# +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# """Tag eligible voters on a GitHub issue for the OpenTelemetry GC election. Behaviour: diff --git a/scripts/gc-elections/generate-voters-roll.py b/scripts/gc-elections/generate-voters-roll.py index 145e79bb5..0832753b4 100644 --- a/scripts/gc-elections/generate-voters-roll.py +++ b/scripts/gc-elections/generate-voters-roll.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 +# +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# import csv import datetime import os diff --git a/scripts/move-to-emeritus.py b/scripts/move-to-emeritus.py index c14b995fc..b7c5402b3 100644 --- a/scripts/move-to-emeritus.py +++ b/scripts/move-to-emeritus.py @@ -1,20 +1,25 @@ #!/usr/bin/env python3 -# Usage: -# # Check all repos and print report -# python move-to-emeritus.py # -# # Check all repos with debug output (shows why each member was marked active/inactive) -# python move-to-emeritus.py --debug -# -# # Check only specific repo(s) -# python move-to-emeritus.py --repo opentelemetry-collector -# python move-to-emeritus.py --repo opentelemetry-collector opentelemetry-python -# -# # Create PRs to move inactive members to emeritus (after verifying the report) -# python move-to-emeritus.py --create-prs -# -# Note: the script can be safely re-run multiple times. If a PR already exists for a repo, its body will be updated with the latest info. +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 # +""" +Usage: + # Check all repos and print report + python move-to-emeritus.py + + # Check all repos with debug output (shows why each member was marked active/inactive) + python move-to-emeritus.py --debug + + # Check only specific repo(s) + python move-to-emeritus.py --repo opentelemetry-collector + python move-to-emeritus.py --repo opentelemetry-collector opentelemetry-python + + # Create PRs to move inactive members to emeritus (after verifying the report) + python move-to-emeritus.py --create-prs + +Note: the script can be safely re-run multiple times. If a PR already exists for a repo, its body will be updated with the latest info. +""" import argparse import base64 import json diff --git a/scripts/update-community-members.py b/scripts/update-community-members.py index 07e65a5d4..ac3c6d4f7 100755 --- a/scripts/update-community-members.py +++ b/scripts/update-community-members.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# import subprocess import sys diff --git a/scripts/update-sig-tables.py b/scripts/update-sig-tables.py index 6a5dcb5c3..29949eb1f 100755 --- a/scripts/update-sig-tables.py +++ b/scripts/update-sig-tables.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 import re import subprocess import sys diff --git a/scripts/validate-workstreams.py b/scripts/validate-workstreams.py index d8d6bea7d..437cb20b3 100644 --- a/scripts/validate-workstreams.py +++ b/scripts/validate-workstreams.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# """ Validates workstreams.yml. From c9ca1a5f5cd20afa66e645067420b6f974ca5ca6 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Thu, 8 Oct 2026 07:00:20 -0700 Subject: [PATCH 2/2] add license check in CI Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- .github/workflows/build.yml | 10 ++++++++++ Makefile | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index abbb6e0c2..132e17793 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,3 +28,13 @@ jobs: env: # see https://lychee.cli.rs/troubleshooting/rate-limits/#github-rate-limiting GITHUB_TOKEN: ${{ github.token }} + + license-check: + runs-on: ubuntu-slim + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Run license-check + run: make license-check diff --git a/Makefile b/Makefile index fee1d51b9..47bd351ec 100644 --- a/Makefile +++ b/Makefile @@ -28,3 +28,13 @@ markdown-link-check: --root-dir /home/repo \ --verbose \ home/repo + +.PHONY: license-check +license-check: + @licRes=$$(for f in $$(find . -type f \( -iname '*.py' -o -iname '*.sh' \) ! -path '**/third_party/*' ! -path './.git/*' ) ; do \ + awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \ + done); \ + if [ -n "$${licRes}" ]; then \ + echo "license header checking failed:"; echo "$${licRes}"; \ + exit 1; \ + fi