Skip to content

Add machine-readable dates to keep docs up-to-date #1018

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

Closed
camelid opened this issue Jan 11, 2021 · 8 comments · Fixed by #1037
Closed

Add machine-readable dates to keep docs up-to-date #1018

camelid opened this issue Jan 11, 2021 · 8 comments · Fixed by #1037
Assignees

Comments

@camelid
Copy link
Member

camelid commented Jan 11, 2021

Is there someway to make the data references machine parseable? We could then write a simple tool to remind us when references are ~6 months old, and we should check it they’re still true.

Originally posted by @rylev in #1013 (comment)

@camelid
Copy link
Member Author

camelid commented Jan 11, 2021

I suggested one way of doing it here: #1013 (comment)

Another way is to use HTML comments like <!-- date: 2021-01-10 -->, which seems very feasible. Then we can add those comments to parts of the docs that say "As of now" or "As of January 2021" and then we can have a GitHub Action that automatically creates an issue after 6 months saying "Check in on this spot".

@camelid camelid changed the title Add machine-readable date references to keep docs up-to-date Add machine-readable dates to keep docs up-to-date Jan 11, 2021
@jyn514
Copy link
Member

jyn514 commented Jan 13, 2021

We decided in today's meeting that we should do this with a GitHub action that runs monthly and opens at most one issue with checkboxes for each section of the guide that's out of date (and preferably tag it with E-easy).

@camelid
Copy link
Member Author

camelid commented Jan 19, 2021

Status update:

I've been working on this, and I think it's almost done! 🎉
I'm not familiar with GitHub Actions beyond basic cargo build CI, so I
think I'm going to test it on a private repo first to make sure it works.

I also had an idea for a way to make sure people use <!-- date: 2021-01 -->:
We add another GitHub Action as part of CI that looks for the phrase as of now
(case-insensitive and with varying whitespace of course) and fails CI if it
finds one. It then prints out a message to the logs or, better yet, posts a
comment that says something like:

Please use the phrase as of January 2021 instead of as of now since it
makes it easier to determine if something is still true. Additionally,
please add a <!-- date: 2021-01 --> comment near the as of January 2021
phrase
so that our automated system can pick it up. Thanks!

where January 2021 and 2021-01 would be whatever the current month was.
I think this check could be implemented fairly easily. Maybe I can do it after I
finish the date-checker.

@rylev
Copy link
Member

rylev commented Jan 20, 2021

@camelid FYI: we're currently using TravisCI though there is an issue for switching to GitHub Actions #940

@camelid
Copy link
Member Author

camelid commented Jan 20, 2021

Yeah, I think it's better if new things are added to GitHub — plus it's easier since it seems GitHub Actions would have better integrations with GitHub, e.g. for opening issues ;)

@camelid
Copy link
Member Author

camelid commented Jan 23, 2021

I tested this on a private repo, and confirmed that it works! 🎉

PR: #1037

@camelid
Copy link
Member Author

camelid commented Feb 4, 2021

Since it's February 3, and thus we missed the start of the month, and also to test it, I'm going to manually trigger a run of the date-checker now!

@camelid
Copy link
Member Author

camelid commented Feb 4, 2021

It worked! #1046

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 a pull request may close this issue.

3 participants