Skip to content

chore: add annual LICENSE copyright year update workflow#9

Merged
nathanialhenniges merged 1 commit intomainfrom
chore/license-year-workflow-v2
Mar 18, 2026
Merged

chore: add annual LICENSE copyright year update workflow#9
nathanialhenniges merged 1 commit intomainfrom
chore/license-year-workflow-v2

Conversation

@nathanialhenniges
Copy link
Copy Markdown
Member

@nathanialhenniges nathanialhenniges commented Mar 18, 2026

Summary

  • Adds a GitHub Actions cron workflow that automatically updates the LICENSE copyright year on January 1st at midnight CST
  • Supports manual triggering via workflow_dispatch for testing
  • Commits as MrDemonWolf, Inc. and skips if the year is already current

Test plan

  • Manually trigger the workflow via the Actions tab to verify it runs
  • Confirm the sed pattern matches the LICENSE format

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added automated annual update of the LICENSE copyright year.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

Walkthrough

A new GitHub Actions workflow is introduced to automatically update the copyright year in the LICENSE file annually on January 1st, with support for manual triggering. The workflow performs git operations to commit and push changes when modifications occur.

Changes

Cohort / File(s) Summary
License Year Automation
.github/workflows/update-license-year.yml
New GitHub Actions workflow that automatically updates the copyright year in LICENSE file on yearly cron schedule (January 1st at 06:00 UTC) or via manual dispatch, with git commit/push on changes detected.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through January's snow,
With workflows that make licenses glow,
The copyright year now flows so free,
Automated magic for all to see! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a GitHub Actions workflow that automatically updates the LICENSE copyright year annually.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/license-year-workflow-v2
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/update-license-year.yml (1)

27-34: Harden push behavior for branch movement edge cases.

Consider rebasing before push and using an explicit refspec to reduce non-fast-forward/branch-context failures.

Suggested patch
           git add LICENSE
           git commit -m "chore: update LICENSE copyright year to $CURRENT_YEAR"
-          git push
+          git pull --rebase origin main
+          git push origin HEAD:main
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/update-license-year.yml around lines 27 - 34, The push can
fail on branch movement; before pushing, fetch the remote and rebase locally to
ensure a fast-forward and then push using an explicit refspec and safe force
mode: replace the current git push line (and adjacent commit logic around
CURRENT_YEAR and git commit -m) with steps that run git fetch origin, determine
the branch from the incoming CI env (strip refs/heads/ from GITHUB_REF), run git
pull --rebase --autostash origin/<branch> (or git rebase origin/<branch>) to
rebase your LICENSE commit, and finally git push --force-with-lease origin
HEAD:refs/heads/<branch> (explicit refspec) to avoid
non-fast-forward/branch-context failures.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/update-license-year.yml:
- Around line 13-15: The update-year job (update-year) in the workflow must set
SKIP_ENV_VALIDATION=true so t3-env is bypassed during CI; add an env entry
SKIP_ENV_VALIDATION: "true" (or SKIP_ENV_VALIDATION=true) to the update-year
job's environment (e.g., under the steps or job-level env for update-year) so
the job will skip runtime secret validation during the workflow run.

---

Nitpick comments:
In @.github/workflows/update-license-year.yml:
- Around line 27-34: The push can fail on branch movement; before pushing, fetch
the remote and rebase locally to ensure a fast-forward and then push using an
explicit refspec and safe force mode: replace the current git push line (and
adjacent commit logic around CURRENT_YEAR and git commit -m) with steps that run
git fetch origin, determine the branch from the incoming CI env (strip
refs/heads/ from GITHUB_REF), run git pull --rebase --autostash origin/<branch>
(or git rebase origin/<branch>) to rebase your LICENSE commit, and finally git
push --force-with-lease origin HEAD:refs/heads/<branch> (explicit refspec) to
avoid non-fast-forward/branch-context failures.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f1ce3a36-f401-4973-bdd3-c173d11ea0ff

📥 Commits

Reviewing files that changed from the base of the PR and between 992f7d5 and 3c6485b.

📒 Files selected for processing (1)
  • .github/workflows/update-license-year.yml

Comment on lines +13 to +15
update-year:
runs-on: ubuntu-latest
steps:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add SKIP_ENV_VALIDATION to this workflow job.

This workflow file matches the repository rule but does not set SKIP_ENV_VALIDATION=true.

Suggested patch
 jobs:
   update-year:
     runs-on: ubuntu-latest
+    env:
+      SKIP_ENV_VALIDATION: "true"
     steps:

As per coding guidelines, {.github/workflows/*.yml,Dockerfile,docker-entrypoint.sh}: Use SKIP_ENV_VALIDATION=true to bypass t3-env during CI and Docker build when runtime secrets aren't available.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
update-year:
runs-on: ubuntu-latest
steps:
update-year:
runs-on: ubuntu-latest
env:
SKIP_ENV_VALIDATION: "true"
steps:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/update-license-year.yml around lines 13 - 15, The
update-year job (update-year) in the workflow must set SKIP_ENV_VALIDATION=true
so t3-env is bypassed during CI; add an env entry SKIP_ENV_VALIDATION: "true"
(or SKIP_ENV_VALIDATION=true) to the update-year job's environment (e.g., under
the steps or job-level env for update-year) so the job will skip runtime secret
validation during the workflow run.

@nathanialhenniges nathanialhenniges merged commit 422cce5 into main Mar 18, 2026
3 checks passed
@nathanialhenniges nathanialhenniges deleted the chore/license-year-workflow-v2 branch March 26, 2026 15:56
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.

1 participant