-
Notifications
You must be signed in to change notification settings - Fork 376
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
Improve outdated tutorials check #1021
base: master
Are you sure you want to change the base?
Conversation
jooola
commented
Dec 10, 2024
- Extract summary building in a script that can be run locally
- Include the date of the tutorials in the summary table
- Add the year to the created issue title
- Test the workflow when files are changed in a pull_request
pull_request: | ||
branches: [master] | ||
paths: | ||
- .github/workflows/outdated-tutorials.yml | ||
- hack/outdated-tutorials-summary.sh |
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.
Allows the workflow to run on pull request, so we can test changes.
hack/outdated-tutorials-summary.sh | tee summary.md $GITHUB_STEP_SUMMARY | ||
|
||
- name: Create issue | ||
if: github.event_name == 'schedule' |
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.
Only create an issue if the workflow is run from a schedule, since we only want to test the summary generation in pull requests.
- Extract summary building in a script that can be run locally - Include the date of the tutorials in the summary table - Add the year to the created issue title - Test the workflow when files are changed in a pull_request
If you run community-content/.github/workflows/outdated-tutorials.yml Lines 4 to 5 in 37f2d56
then tutorials written in the previous year, but not on the first day of the month will not be present in the table. You will need to wait two years to review them. This condition will be false, because their timestamps will be bigger:
To reproduce, replace:
This tutorial will not be present. |