Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 3.92 KB

File metadata and controls

71 lines (46 loc) · 3.92 KB

Maintain code snippets in Azure docs

This repository contains scripts to help maintain code snippets in Azure documentation. The scripts are designed to be run in a GitHub Codespace. https://github.com/pulls?q=is%3Apr+is%3Aopen+user-review-requested%3A%40me If you're evaluating a file for Machine Learning FRESHNESS, see the Freshness Dashboard.

Setup for Codespaces

Follow the steps to create/update a GitHub access token for use with the scripts in this repo.

Once your secret is stored, perform all maintenance tasks using the button below to open this repo in GitHub Codespaces. No additional setup needed. Use the Codespace terminal to run the scripts.

Open in GitHub Codespaces

Daily tasks

  1. Check for message at the AI Platform Docs teams channel.

  2. Check for PRs that need approval. (Wait until all build checks have passed before you review. Or if someone pings you on the teams channel. Ignore old ones as they most likely have been abandoned.)

  3. (Requires the GH_ACCESS_TOKEN secret) For each PR number that you need to review, in the terminal, run:

    • for azureml-examples repo:

      python GitHub/pr-report.py <PR number> 
    • for foundry-samples repo:

      python GitHub/pr-report.py <PR number> ai
  4. Approve if no issues reported.

  5. If issues are present, see Fix the Problem

Weekly tasks

Update snippet references and codeowners files

  1. Run this script (takes approximately 12 minutes ):

    python GitHub/find-snippets.py
  2. If changes to CODEOWNERS-xx.txt and refs-found-xx.csv files appear, commit them to sdgilley/learn-tools. You can do this from a Codespace, but if you're on main, you'll first need to switch to a new branch. Create a PR and let me know so I can merge it. (If you're the one maintaining the snippets for the month, no hurry on the PR - just make sure you commit changes before the end of the month so the next person has the right versions of these files.)

  3. You can ignore any other txt or csv files that are changed.

  4. If changes to CODEOWNERS-azureml-examples.txt appear, copy the content and commit to azureml-examples CODEOWNERS file.

  5. If changes to CODEOWNERS-foundry-samples.txt appear, copy the content and commit to azureml-examples CODEOWNERS file.

  6. For now, you can ignore changes to CODEOWNERS-azureai-samples.txt.

  7. If temp-fix is not listed as one of the active branches, update the temp-fix branch to keep it current.

Update docs

  1. Run the merge report. If last run 7 days ago, simply run:

    python GitHub/merge-report.py 

    The report will show PRs merged in the last 8 days. (The extra day insures that you don't miss a merge that happened after your report 7 days ago.)

  2. If longer than 7 days since last run, add a days parameter to the command.:

    python GitHub/merge-report.py <days>
  3. Modify the files in azure-ai-docs-pr as listed in the report. If there are more than 10 files, break it into multiple PRs to be eligible for auto-merge. (You'll see three separate sections, make sure you look at results from all three.)

  4. You might want to copy the report output to your work item. This will let you see when it was last run, so that you can adjust days accordingly for your next report.