Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 2.78 KB

code-snippets.md

File metadata and controls

55 lines (33 loc) · 2.78 KB

Maintain code snippets in Azure docs

Store your GH_ACCESS_TOKEN as a Codespace secret to use in the repository sdgilley/learn-tools.

Make sure you configure the SSO for your github token to work with MicrosoftDocs.

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

Open in GitHub Codespaces

Daily tasks

  1. Check for PRs that need approval

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

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

  4. If issues are present, see Fix the Problem

Weekly tasks

Update snippet references and codeowners files

  1. Run this script (takes about two minutes):

    python GitHub/find-snippets.py
  2. If changes to .txt and .csv files appear, commit them to this repo (learn-tools). You can do this from a Codespace, but you'll first need to switch to a new branch.

  3. If changes to CODEOWNERS appear, commit them to azureml-examples CODEOWNERS file

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:

    python GitHub/merge-report.py <days>
  3. Modify the files in azure-docs-pr as listed in the report.

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