-
Notifications
You must be signed in to change notification settings - Fork 22
Update the year in Copyright message #228
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
base: master
Are you sure you want to change the base?
Conversation
Copyright notices should ideally include the start and current year It's also preferred for this not to need updating yearly and on page load this be auto-updated for the reader
Creates a workflow that runs at the begining of each new year to update the Copyright Notice with the correct year
|
I've updated this based on research pointing to it being recommended that you should keep the first published year as well as current year in copyright notices as per UK Copyright Service I will be updating this branch shortly with an updated workflow & script that can be used to ensure this gets updated yearly whilst the site uses this theme as it does not provide a dynamic update of the notice for us like other themes can do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this will work, a schedule GitHub actions will be disabled due to repository inactivity after 60 days so it might not run when it need to.
. In a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days.
https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow
| $configContent = Get-Content -Path $configFilePath | ||
| $currentYear = (Get-Date).Year | ||
| $PreviousYear = (Get-Date).Year - 1 | ||
| $UpdatedContent = $Content -replace $PreviousYear, $NewYear |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably make sure it changes the number on only the correct row so there isn't a value of say 2026 in some other place that should not change. 🤔
|
converting this to a draft for now as want to discuss some points in the DSC Community call
If PR then I can code to automatically assign on creation of the PR
I can think of where we have a check workflow that checks the Maintainers of each of the repos in the DSCCommunity and then updates the dated and out of date maintainers page (and can be done all using gh cli tool and gh Apis) though this is only useful if we start adding more maintainers across repos that can reduce reliance on the few that have maintainer rights across all the repo's right now |
This change is