|
| 1 | +Generate release notes for Data Prepper version $ARGUMENTS. |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +You are generating user-facing release notes for the OpenSearch Data Prepper project. |
| 6 | +The milestone to use is: $ARGUMENTS |
| 7 | + |
| 8 | +You will gather data from GitHub, categorize each item, reword it for clarity, and produce |
| 9 | +a release notes file following the project's established format. |
| 10 | + |
| 11 | +## Step 1: Gather Data |
| 12 | + |
| 13 | +Run these commands to fetch all closed issues and PRs for the milestone. |
| 14 | +Request the fields: number, url, title, labels, body. |
| 15 | + |
| 16 | +``` |
| 17 | +gh issue list --repo opensearch-project/data-prepper --search 'milestone:$ARGUMENTS' --state closed --json number,url,title,labels,body --limit 200 |
| 18 | +``` |
| 19 | + |
| 20 | +``` |
| 21 | +gh pr list --repo opensearch-project/data-prepper --search 'milestone:$ARGUMENTS' --state closed --json number,url,title,labels,body --limit 200 |
| 22 | +``` |
| 23 | + |
| 24 | +Collect all results. Note which items are issues vs PRs. |
| 25 | + |
| 26 | +## Step 2: Read the Label-to-Category Mapping |
| 27 | + |
| 28 | +Read the file `release/script/release-notes/label-category-mapping.md` for the full rules |
| 29 | +on how labels map to categories, how to distinguish Features from Enhancements, what to |
| 30 | +exclude, and what to consolidate. |
| 31 | + |
| 32 | +## Step 3: Read Example Release Notes for Style |
| 33 | + |
| 34 | +Read 2-3 of the most recent release notes files in `release/release-notes/`. Use only |
| 35 | +files matching `data-prepper.release-notes-*.md` -- ignore `data-prepper.change-log-*.md` |
| 36 | +files, which are a different format. Study the tone, format, and level of detail. |
| 37 | +Key style observations: |
| 38 | + |
| 39 | +- Each item is a single bullet point: `* Description ([#N](url))` |
| 40 | +- Descriptions are concise, active, and user-facing |
| 41 | +- They describe what changed from the user's perspective, not implementation details |
| 42 | +- Multiple related links can appear: `([#N1](url1), [#N2](url2))` |
| 43 | +- Security items typically reference the vulnerability issue verbatim |
| 44 | +- The date format is YYYY-MM-DD |
| 45 | +- Empty categories are kept in the output (the heading with no items below it) |
| 46 | + |
| 47 | +## Step 4: Categorize Each Item |
| 48 | + |
| 49 | +For each issue/PR: |
| 50 | + |
| 51 | +1. **Check exclusion rules first.** Skip release prep PRs, changelog PRs, release notes PRs, |
| 52 | + individual dependency bumps, license header updates, and bot housekeeping PRs. |
| 53 | + |
| 54 | +2. **Apply label-based categorization.** Use the mapping rules to assign a category. |
| 55 | + |
| 56 | +3. **Confirm by reading the body.** If the labels suggest one category but the body clearly |
| 57 | + indicates another, override the label-based assignment. Pay special attention to: |
| 58 | + - Distinguishing Features (new capability) from Enhancements (improving existing) |
| 59 | + - Items labeled `enhancement` that are actually bug fixes |
| 60 | + - Items with no relevant labels -- categorize based on the body content |
| 61 | + |
| 62 | +4. **Consolidate related items.** When an issue and its implementing PR(s) are both in the |
| 63 | + milestone, produce one line. Prefer linking to the issue. If a PR has no corresponding |
| 64 | + issue, link to the PR. |
| 65 | + |
| 66 | +## Step 5: Reword Each Item |
| 67 | + |
| 68 | +Rewrite each item to be: |
| 69 | + |
| 70 | +- **Direct and concise**: "Support X" not "Add support for X", "Added support for X", |
| 71 | + or "Support for X was added". Lead with the verb, skip filler words. |
| 72 | +- **User-facing**: Describe the impact, not the implementation. "Support compressed files |
| 73 | + in the file source" not "Add GzipInputStream wrapper to FileSource class" |
| 74 | +- **Concise**: One sentence, no trailing periods |
| 75 | +- **Specific**: Name the plugin or component when relevant. "Support partition keys in the |
| 76 | + OTel metrics source with persistent buffers" not "Support partition keys" |
| 77 | + |
| 78 | +Do NOT use the prefix tags like "feat:", "fix:", "refactor:" from commit messages. |
| 79 | + |
| 80 | +## Step 6: Produce the Output |
| 81 | + |
| 82 | +Write the release notes file to: |
| 83 | +`release/release-notes/data-prepper.release-notes-VERSION.md` |
| 84 | + |
| 85 | +where VERSION is derived from the milestone (e.g. milestone `v2.15` produces version `2.15.0` |
| 86 | +if it's a minor release). |
| 87 | + |
| 88 | +Use today's date in the header. |
| 89 | + |
| 90 | +Format: |
| 91 | + |
| 92 | +``` |
| 93 | +## YYYY-MM-DD Version M.m.p |
| 94 | +
|
| 95 | +--- |
| 96 | +
|
| 97 | +### Breaking Changes |
| 98 | +
|
| 99 | +* Item ([#N](url)) |
| 100 | +
|
| 101 | +### Features |
| 102 | +
|
| 103 | +* Item ([#N](url)) |
| 104 | +
|
| 105 | +### Enhancements |
| 106 | +
|
| 107 | +* Item ([#N](url)) |
| 108 | +
|
| 109 | +### Bug Fixes |
| 110 | +
|
| 111 | +* Item ([#N](url)) |
| 112 | +
|
| 113 | +### Security |
| 114 | +
|
| 115 | +* Item ([#N](url)) |
| 116 | +
|
| 117 | +### Maintenance |
| 118 | +
|
| 119 | +* Item ([#N](url)) |
| 120 | +
|
| 121 | +``` |
| 122 | + |
| 123 | +Keep all six category headings even if a category has no items. |
| 124 | + |
| 125 | +## Step 7: Review |
| 126 | + |
| 127 | +After writing the file, read it back and check: |
| 128 | +- No duplicate items |
| 129 | +- No excluded items leaked through |
| 130 | +- Items are in the correct categories |
| 131 | +- Wording is consistent in style |
| 132 | +- All links are correct |
| 133 | + |
| 134 | +Present the final file to the user and note any items where categorization was uncertain |
| 135 | +so they can review those specifically. |
0 commit comments