chore(agent): fix copyright-headers skill with correct header#12
chore(agent): fix copyright-headers skill with correct header#12feloy merged 1 commit intokortex-hub:mainfrom
Conversation
…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>
📝 WalkthroughWalkthroughThis 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
skills/copyright-headers/SKILL.md (1)
33-37: Avoid hardcoding2026in skill rules/examples.These rules will drift next year and can generate stale guidance. Prefer a dynamic placeholder like
CURRENT_YEARin 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 noticeAlso 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
📒 Files selected for processing (10)
.github/dependabot.ymlMakefilecmd/kortex-cli/main.gocmd/kortex-cli/main_test.gopkg/cmd/root.gopkg/cmd/root_test.gopkg/cmd/version.gopkg/cmd/version_test.gopkg/version/version.goskills/copyright-headers/SKILL.md
fix copyright-headers skill with correct header and replace headers in src files
Fixes #10