Skip to content

chore(agent): fix copyright-headers skill with correct header#12

Merged
feloy merged 1 commit intokortex-hub:mainfrom
feloy:fix-headers
Feb 27, 2026
Merged

chore(agent): fix copyright-headers skill with correct header#12
feloy merged 1 commit intokortex-hub:mainfrom
feloy:fix-headers

Conversation

@feloy
Copy link
Copy Markdown
Contributor

@feloy feloy commented Feb 27, 2026

fix copyright-headers skill with correct header and replace headers in src files

Fixes #10

…lace headers in src files

Co-Authored-By: Claude Code (Claude Sonnet 4.5) <noreply@anthropic.com>

Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy requested review from benoitf and jeffmaury February 27, 2026 16:02
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 27, 2026

📝 Walkthrough

Walkthrough

This PR standardizes license headers across the codebase to include Apache-2.0 SPDX identifiers and updates copyright years to 2026. It also extends the copyright-headers skill documentation to support expanded year-range handling and SPDX header detection patterns.

Changes

Cohort / File(s) Summary
Build and Configuration
.github/dependabot.yml, Makefile
Added and standardized license header blocks with Apache-2.0 SPDX identifier and updated copyright year to 2026.
CLI Source Files
cmd/kortex-cli/main.go, cmd/kortex-cli/main_test.go
Replaced license headers with consolidated Apache-2.0 format including SPDX identifier; no functional changes.
Command Package Files
pkg/cmd/root.go, pkg/cmd/root_test.go, pkg/cmd/version.go, pkg/cmd/version_test.go
Updated license headers to standardized Apache-2.0 format with SPDX identifier; no code logic modifications.
Version Package Files
pkg/version/version.go
Replaced copyright header with expanded Apache-2.0 license block including SPDX identifier; functional content unchanged.
Copyright Headers Skill Documentation
skills/copyright-headers/SKILL.md
Expanded header-detection keywords to include SPDX identifiers, extended year-range handling examples with "(C)" variants, and updated Go/YAML/Makefile header format examples to reflect new standardized patterns with 2026 year updates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • kortex-hub/kortex-cli#4: Introduces the copyright-headers skill that is documented and configured by the SKILL.md updates in this PR.
  • kortex-hub/kortex-cli#5: Also modifies skills/copyright-headers/SKILL.md with overlapping scope regarding skill configuration.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the copyright-headers skill and replacing copyright headers across source files.
Description check ✅ Passed The description directly relates to the changeset, explaining that the PR fixes the copyright-headers skill and replaces headers in source files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
skills/copyright-headers/SKILL.md (1)

33-37: Avoid hardcoding 2026 in skill rules/examples.

These rules will drift next year and can generate stale guidance. Prefer a dynamic placeholder like CURRENT_YEAR in instructions/examples, then resolve it at runtime when applying updates.

Proposed doc refactor
- - **Single past year** (e.g., `Copyright (C) 2024`) → Update to range: `Copyright (C) 2024-2026`
+ - **Single past year** (e.g., `Copyright (C) 2024`) → Update to range: `Copyright (C) 2024-CURRENT_YEAR`

- - **Range ending before current year** (e.g., `Copyright (C) 2024-2025`) → Update end year: `Copyright (C) 2024-2026`
+ - **Range ending before current year** (e.g., `Copyright (C) 2024-2025`) → Update end year: `Copyright (C) 2024-CURRENT_YEAR`

-# Copyright (C) 2026 Red Hat, Inc.
+# Copyright (C) CURRENT_YEAR Red Hat, Inc.

-* Copyright (C) 2026 Red Hat, Inc.
+* Copyright (C) CURRENT_YEAR Red Hat, Inc.

-- Use the current year (2026) in the copyright notice
+- Use the current year (`CURRENT_YEAR`) in the copyright notice

Also applies to: 45-47, 69-69, 117-117

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/copyright-headers/SKILL.md` around lines 33 - 37, Replace hardcoded
year "2026" in the example rules/bullets (the list of copyright cases and the
example strings like `Copyright (C) 2026` and `Copyright (C) 2024-2026`) with a
dynamic placeholder `CURRENT_YEAR`, and update the guidance text to say "resolve
`CURRENT_YEAR` at runtime when applying updates"; ensure all occurrences in the
same document (the example rule block and the other noted example lines) are
replaced and examples demonstrate both single-year and range cases using
`CURRENT_YEAR` (e.g., `Copyright (C) CURRENT_YEAR` and `Copyright (C)
2024-CURRENT_YEAR`), keeping the logic/meaning unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@skills/copyright-headers/SKILL.md`:
- Around line 33-37: Replace hardcoded year "2026" in the example rules/bullets
(the list of copyright cases and the example strings like `Copyright (C) 2026`
and `Copyright (C) 2024-2026`) with a dynamic placeholder `CURRENT_YEAR`, and
update the guidance text to say "resolve `CURRENT_YEAR` at runtime when applying
updates"; ensure all occurrences in the same document (the example rule block
and the other noted example lines) are replaced and examples demonstrate both
single-year and range cases using `CURRENT_YEAR` (e.g., `Copyright (C)
CURRENT_YEAR` and `Copyright (C) 2024-CURRENT_YEAR`), keeping the logic/meaning
unchanged.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e53b1f and ee7b233.

📒 Files selected for processing (10)
  • .github/dependabot.yml
  • Makefile
  • cmd/kortex-cli/main.go
  • cmd/kortex-cli/main_test.go
  • pkg/cmd/root.go
  • pkg/cmd/root_test.go
  • pkg/cmd/version.go
  • pkg/cmd/version_test.go
  • pkg/version/version.go
  • skills/copyright-headers/SKILL.md

@feloy feloy merged commit 25aad29 into kortex-hub:main Feb 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix copyright header

2 participants