|
| 1 | +--- |
| 2 | +description: "Generate the monthly What's New in Visual Studio docs update from git history. Use at the start of each month to add the previous month's changes." |
| 3 | +argument-hint: "Month and year to generate, e.g. 'March 2026'" |
| 4 | +agent: agent |
| 5 | +--- |
| 6 | + |
| 7 | +# Update "What's New in Visual Studio Docs" |
| 8 | + |
| 9 | +Generate a monthly update section for [docs/ide/whats-new-visual-studio-docs.md](../../docs/ide/whats-new-visual-studio-docs.md) based on git commit history. |
| 10 | + |
| 11 | +## Input |
| 12 | + |
| 13 | +The target month: **${input:month}** |
| 14 | + |
| 15 | +## Workflow |
| 16 | + |
| 17 | +Follow these steps **in order**. Do not skip steps. |
| 18 | + |
| 19 | +### Step 1: Determine the date range |
| 20 | + |
| 21 | +Parse the month argument (e.g., "March 2026") to compute: |
| 22 | +- `AFTER_DATE`: last day of the previous month (e.g., `2026-02-28`) |
| 23 | +- `BEFORE_DATE`: first day of the next month (e.g., `2026-04-01`) |
| 24 | + |
| 25 | +### Step 2: Get new articles |
| 26 | + |
| 27 | +Run this git command to find files **added** during the month: |
| 28 | + |
| 29 | +``` |
| 30 | +git log --after="AFTER_DATE" --before="BEFORE_DATE" --diff-filter=A --name-only --pretty=format:"COMMIT:%s" -- "docs/**/*.md" |
| 31 | +``` |
| 32 | + |
| 33 | +Filter out files under `docs/**/includes/` and `whats-new` files. |
| 34 | + |
| 35 | +### Step 3: Get updated articles |
| 36 | + |
| 37 | +Run this git command to find files **modified** during the month: |
| 38 | + |
| 39 | +``` |
| 40 | +git log --after="AFTER_DATE" --before="BEFORE_DATE" --diff-filter=M --name-only --pretty=format:"COMMIT:%s" -- "docs/**/*.md" |
| 41 | +``` |
| 42 | + |
| 43 | +Filter out files under `docs/**/includes/` and `whats-new` files. |
| 44 | + |
| 45 | +### Step 4: Build the file-to-commit-description mapping |
| 46 | + |
| 47 | +Run a git command that pairs each file with its commit messages: |
| 48 | + |
| 49 | +``` |
| 50 | +git log --after="AFTER_DATE" --before="BEFORE_DATE" --diff-filter=M --name-only --pretty=format:"COMMIT_MSG:%s" -- "docs/**/*.md" |
| 51 | +``` |
| 52 | + |
| 53 | +Parse the output to build a mapping of `file → [list of commit messages]`. Deduplicate files. This mapping drives the descriptions for each entry. |
| 54 | + |
| 55 | +### Step 5: Extract article titles |
| 56 | + |
| 57 | +For each changed file, extract the `title:` field from its YAML front matter using `Select-String`: |
| 58 | + |
| 59 | +``` |
| 60 | +Select-String -Path $file -Pattern '^title:\s*"?(.+?)"?\s*$' |
| 61 | +``` |
| 62 | + |
| 63 | +### Step 6: Identify community contributors |
| 64 | + |
| 65 | +Run this command to find all non-Microsoft contributors: |
| 66 | + |
| 67 | +``` |
| 68 | +git log --after="AFTER_DATE" --before="BEFORE_DATE" --pretty=format:"%an|||%ae" -- "docs/**/*.md" |
| 69 | +``` |
| 70 | + |
| 71 | +Filter out: |
| 72 | +- `@microsoft.com` email addresses |
| 73 | +- `prmerger-automator[bot]` |
| 74 | +- `Learn Build Service` |
| 75 | + |
| 76 | +Also get merge commit subjects to count PRs per external contributor: |
| 77 | + |
| 78 | +``` |
| 79 | +git log --after="AFTER_DATE" --before="BEFORE_DATE" --merges --pretty=format:"%s" -- "docs/**/*.md" |
| 80 | +``` |
| 81 | + |
| 82 | +**Important**: The contributor list will need manual review by the author. Some contributors with `@users.noreply.github.com` emails may still be Microsoft employees (vendors, contractors). The author knows who they are and will remove internal contributors after generation. |
| 83 | + |
| 84 | +### Step 7: Compose the new month section |
| 85 | + |
| 86 | +Build the section using these formatting rules. |
| 87 | + |
| 88 | +#### Section structure |
| 89 | + |
| 90 | +Organize by **doc area** (alphabetical), matching the folder structure under `docs/`. Use these area names: |
| 91 | + |
| 92 | +| Folder | Section heading | |
| 93 | +|--------|----------------| |
| 94 | +| `docs/azure/` | Azure | |
| 95 | +| `docs/code-quality/` | Code quality | |
| 96 | +| `docs/containers/` | Containers | |
| 97 | +| `docs/data-tools/` | Data tools | |
| 98 | +| `docs/debugger/` | Debugger | |
| 99 | +| `docs/deployment/` | Deployment | |
| 100 | +| `docs/designers/` | Designers | |
| 101 | +| `docs/extensibility/` | Extensibility | |
| 102 | +| `docs/get-started/` | Get started | |
| 103 | +| `docs/ide/` | IDE | |
| 104 | +| `docs/install/` | Install | |
| 105 | +| `docs/javascript/` | JavaScript | |
| 106 | +| `docs/modeling/` | Modeling | |
| 107 | +| `docs/msbuild/` | MSBuild | |
| 108 | +| `docs/profiling/` | Profiling | |
| 109 | +| `docs/python/` | Python | |
| 110 | +| `docs/sharepoint/` | SharePoint | |
| 111 | +| `docs/test/` | Test | |
| 112 | +| `docs/version-control/` | Version control | |
| 113 | +| `docs/vsto/` | VSTO | |
| 114 | +| `docs/xaml-tools/` | XAML tools | |
| 115 | +| `docs/xml-tools/` | XML tools | |
| 116 | + |
| 117 | +Only include sections that have changes. Skip areas with no new or updated articles. |
| 118 | + |
| 119 | +#### Entry format |
| 120 | + |
| 121 | +Each article entry is a Markdown link using a **relative path from the what's-new file** (`../area/filename.md`), followed by a dash and a brief description derived from the commit messages: |
| 122 | + |
| 123 | +```markdown |
| 124 | +- [Article Title](../area/filename.md) - Brief description of change |
| 125 | +``` |
| 126 | + |
| 127 | +#### Grouping related changes |
| 128 | + |
| 129 | +When multiple files share the same commit message or change purpose, group them under a single description: |
| 130 | + |
| 131 | +```markdown |
| 132 | +- Description of shared change |
| 133 | + - [Article 1](../area/file1.md) |
| 134 | + - [Article 2](../area/file2.md) |
| 135 | +``` |
| 136 | + |
| 137 | +#### New vs Updated |
| 138 | + |
| 139 | +Within each area section, list **New articles** first (if any), then **Updated articles**: |
| 140 | + |
| 141 | +```markdown |
| 142 | +### Area Name |
| 143 | + |
| 144 | +**New articles** |
| 145 | + |
| 146 | +- [New Article Title](../area/new-article.md) |
| 147 | + |
| 148 | +**Updated articles** |
| 149 | + |
| 150 | +- [Updated Article Title](../area/updated-article.md) - What changed |
| 151 | +``` |
| 152 | + |
| 153 | +If there are no new articles for an area, omit the **New articles** sub-heading entirely. |
| 154 | + |
| 155 | +#### Description guidelines |
| 156 | + |
| 157 | +- Derive descriptions from meaningful commit messages, not generic ones like "edits", "metadata", "fix typo" |
| 158 | +- Consolidate multiple small commits on the same file into one meaningful description |
| 159 | +- For screenshot-only updates, use "Review and update screenshots" |
| 160 | +- For broad freshness passes, use "Review and update" |
| 161 | +- Feature-related changes should name the feature (e.g., "Add content for middle-click scroll") |
| 162 | +- Don't include internal commit artifacts like PR numbers |
| 163 | + |
| 164 | +#### Community contributors section |
| 165 | + |
| 166 | +Add at the end of the month, **after all area sections**: |
| 167 | + |
| 168 | +```markdown |
| 169 | +### Community contributors |
| 170 | + |
| 171 | +The following people contributed to the Visual Studio docs during this period. Thank you! Learn how to contribute by following the links under "Get involved" in the [what's new landing page](index.yml). |
| 172 | + |
| 173 | +- [GitHubUsername](https://github.com/GitHubUsername) - Display Name  |
| 174 | +``` |
| 175 | + |
| 176 | +Sort by PR count (descending), then alphabetically. Use the contributor's GitHub username for the link and their git author name as the display name. |
| 177 | + |
| 178 | +### Step 8: Insert the section and update metadata |
| 179 | + |
| 180 | +1. **Insert** the new month section immediately after the intro paragraph ("Welcome to what's new...") and **before** the previous month's section. |
| 181 | +2. **Update `ms.date`** in the YAML front matter to the current date in `MM/DD/YYYY` format. |
| 182 | +3. **Remove the oldest month** so the file always shows exactly **three months** of content. The oldest month section starts at its `## Month Year` heading and runs to the end of the file (including its Community contributors sub-section). |
| 183 | + |
| 184 | +### Step 9: Final review |
| 185 | + |
| 186 | +- Verify all relative links use the `../area/filename.md` pattern |
| 187 | +- Verify article titles match the `title:` field in each file's front matter |
| 188 | +- Confirm three months are shown (new month + two previous) |
| 189 | +- Confirm no `docs/**/includes/` files appear in the listing |
| 190 | +- Confirm the community contributors section is present (even if empty with a note) |
| 191 | + |
| 192 | +## Reference: Current file location |
| 193 | + |
| 194 | +The file to update is: `docs/ide/whats-new-visual-studio-docs.md` |
0 commit comments