Skip to content

Conversation

@kilasuit
Copy link
Contributor

@kilasuit kilasuit commented Mar 4, 2025

This change is Reviewable

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
@kilasuit
Copy link
Contributor Author

kilasuit commented Mar 17, 2025

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.

Copy link
Member

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
Copy link
Member

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. 🤔

@kilasuit kilasuit marked this pull request as draft March 19, 2025 14:06
@kilasuit
Copy link
Contributor Author

converting this to a draft for now as want to discuss some points in the DSC Community call

Should it use a Azure Pipeline or GitHub workflow as can do this in either but using gh workflow makes some things easier (and is a question more about are we thinking longer term of what we allow/disallow as tooling options going forward)

Should we just use an update as bot option direct to the main branch or should this update using a Pull Request (due to low level of changes and reducing maintainence overhead)

If PR then I can code to automatically assign on creation of the PR

If direct to main (have we added / planning to add) branch policies disallowing this in this / other repo's (& if not should we for code security reasons)

if GH Workflow - should we code around having wf's disabled when there's no repo activity (perhaps with another workflow for checks against issues & PR's in this repo or from other DSCCommunity repos

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
We could also get round this with a daily run workflow that updates a lastChecked file

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.

2 participants