Skip to content
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

Add a command to CleanRepo to provide data on the difference bewteen the ms.date value and latest commit #469

Merged
merged 7 commits into from
Jan 31, 2025

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented Jan 28, 2025

For every article in the repo,

  • Find its ms.date value
  • Run a GitHub query to show the differences between the latest commit and the `ms.date. value.
  • Print those stats.

Here's sample output from the C# Guide:

PRs Changes Last Commit    ms.date Path
  2    1482  08-22-2024 09-02-2022 docs/csharp/event-pattern.md
  1       3  07-31-2024 09-15-2021 docs/csharp/nullable-migration-strategies.md
  2    1294  06-07-2024 02-09-2023 docs/csharp/asynchronous-programming/cancel-an-async-task-or-a-list-of-tasks.md
...<snip>... 
  1    1265  06-07-2024 02-06-2018 docs/csharp/roslyn-sdk/get-started/semantic-analysis.md
  1    1265  06-07-2024 02-05-2018 docs/csharp/roslyn-sdk/get-started/syntax-analysis.md
  1    1265  06-07-2024 06-01-2018 docs/csharp/roslyn-sdk/get-started/syntax-transformation.md
  1    1481  08-22-2024 10-23-2018 docs/csharp/tutorials/exploration/interpolated-strings-local.md
 1281 checked. Fresh: 151. Truly stale: 865. Updated but not fresh: 127

This commit adds the code to get all the dates for every published file (markdown or YAML) in a repo.
First pass at a query to find diffs since the ms.date value has been updated.
Functionality is all there.

Time to do some refactoring.

Then, update the readme
Refactor the code a bit, and update the readme file.
@BillWagner BillWagner marked this pull request as ready for review January 30, 2025 22:00
Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

Looks good, thank you Bill!

cleanrepo/Program.cs Show resolved Hide resolved
cleanrepo/Program.cs Outdated Show resolved Hide resolved
cleanrepo/Program.cs Outdated Show resolved Hide resolved
@BillWagner BillWagner enabled auto-merge (squash) January 31, 2025 14:26
@BillWagner BillWagner merged commit cd24856 into dotnet:main Jan 31, 2025
8 checks passed
@BillWagner BillWagner deleted the audit-date-tag branch January 31, 2025 14:26
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