Skip to content

Bump copyright year in LICENSE file #3286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2025

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Jul 23, 2025

This should be done every year. I wonder whether an automated process running in CI could create a PR automatically. Perhaps a workflow triggered by schedule?

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.rst
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Jul 23, 2025
@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Jul 23, 2025

ChatGPT suggests a .github/workflows/update-copyright.yml: workflow:

name: Update Copyright Year

on:
  schedule:
    - cron: '0 0 1 1 *'  # Runs annually on Jan 1st at 00:00 UTC
  workflow_dispatch:  # Optional: allow manual triggering

jobs:
  bump-year:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: Set up Git
        run: |
          git config --global user.name "github-actions[bot]"
          git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"

      - name: Update year in LICENSE.txt file
        run: |
          CURRENT_YEAR=$(date +'%Y')
          sed -i "s/[0-9]\{4\}\(-[0-9]\{4\}\)\?\(.*\)/2019-$CURRENT_YEAR\2/" LICENSE.txt  # Adjust pattern to your file
          
      - name: Check if changes occurred
        run: |
          git diff --exit-code || echo "Changes detected."

      - name: Commit changes
        run: |
          git checkout -b update-copyright-$CURRENT_YEAR
          git add LICENSE
          git commit -m "chore: update copyright year to $CURRENT_YEAR"

      - name: Push branch
        run: git push origin update-copyright-$CURRENT_YEAR

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          title: "chore: update copyright year"
          body: "Automatically updated to reflect the new year."
          base: main
          branch: update-copyright-${{ steps.bump-year.outputs.year }}

@dstansby dstansby enabled auto-merge (squash) July 24, 2025 12:23
@dstansby dstansby removed the needs release notes Automatically applied to PRs which haven't added release notes label Jul 24, 2025
@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Jul 24, 2025
@dstansby dstansby merged commit a4e9660 into zarr-developers:main Jul 24, 2025
28 checks passed
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.67%. Comparing base (9dc744d) to head (a7418f2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3286      +/-   ##
==========================================
+ Coverage   59.16%   59.67%   +0.50%     
==========================================
  Files          78       78              
  Lines        8694     8694              
==========================================
+ Hits         5144     5188      +44     
+ Misses       3550     3506      -44     

see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DimitriPapadopoulos DimitriPapadopoulos deleted the 2025 branch July 24, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs release notes Automatically applied to PRs which haven't added release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants