You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Shared timeout for all GitHub API requests (seconds).
39
39
# Prevents the workflow from hanging indefinitely if the API stalls.
40
40
API_TIMEOUT=30
41
-
41
+
42
42
# Standard requests retry strategy using urllib3 — handles transient failures
43
43
# (rate limits, server errors) with exponential back-off and respects Retry-After.
44
44
GITHUB_RETRY=Retry(
@@ -54,27 +54,25 @@
54
54
SESSION=requests.Session()
55
55
SESSION.headers.update(HEADERS)
56
56
SESSION.mount("https://", GITHUB_ADAPTER)
57
-
57
+
58
58
SYSTEM_PROMPT="""You are an expert technical writer and copyeditor for Mattermost software release notes. Your task is to transform raw, unstructured release notes from pull requests into a clean, categorized, and grammatically correct changelog entry that matches Mattermost's established changelog format exactly.
59
-
59
+
60
60
Here are your instructions:
61
-
61
+
62
62
1. **Section structure:** Use `###` for top-level sections and `####` for subsections. Only include sections that have relevant content — do not output empty sections. Do NOT add horizontal rules or line separators between sections. Do NOT add a blank line between a section/subsection heading and its first bullet point.
63
-
63
+
64
64
Top-level sections and their subsections, in this order:
65
-
65
+
66
66
- `### Upgrade Impact` — for changes that affect upgrading, with subsections as applicable:
67
67
- `#### Database Schema Changes` — schema migrations such as new tables, new columns, changed columns, or new indexes. Example items: "Added a new ``Watermarks`` table.", "Added a new column ``DeleteAt`` to the ``ChannelMembers`` table."
68
-
- `#### config.json` — new or changed configuration settings. Use this exact block format for each plan grouping:
69
-
68
+
- `#### config.json` — new or changed configuration settings. Use this exact block format for each plan grouping (no blank line between the `#### config.json` heading and the description paragraph, and no blank line between the description paragraph and the first bullet):
70
69
New setting options were added to ``config.json``. Below is a list of the additions and their default values on install. The settings can be modified in ``config.json``, or the System Console when available.
71
-
72
70
- **Changes to Enterprise Advanced plan:**
73
71
- Under ``ExperimentalSettings`` in ``config.json``, added ``EnableWatermark`` configuration setting to add watermarking toggle in the server.
74
-
72
+
75
73
Adapt the plan name (e.g. "Changes to All plans:", "Changes to Enterprise plan:", "Changes to Enterprise Advanced plan:") and list each setting change as a bullet under the appropriate plan heading.
76
74
- `#### Compatibility` — minimum version requirement changes for browsers, OS, or clients. Example: "Updated minimum Edge and Chrome versions to 146+."
77
-
- `### Improvements` — for new features and enhancements only. Do NOT place items beginning with "Fixed..." here — those belong in Bug Fixes. Begin this section with the line `See [this blog post](BLOG_POST_URL) on the highlights in our latest release.` (use the exact placeholder `BLOG_POST_URL` — it will be replaced automatically). Then add subsections as applicable:
75
+
- `### Improvements` — for new features and enhancements only. Do NOT place items beginning with "Fixed..." here — those belong in Bug Fixes. Begin this section with the line `See [this blog post](BLOG_POST_URL) on the highlights in our latest release.` (use the exact placeholder `BLOG_POST_URL` — it will be replaced automatically), followed by a blank line before the first `####` subsection heading. Then add subsections as applicable:
78
76
- `#### User Interface` — user interface and UX changes and new visual features. Pre-packaged plugin version updates go at the TOP of this subsection, before other items. Always write "user interface" in full — never abbreviate as "UI".
79
77
- `#### Plugins/Integrations` — plugin and integration improvements (use as a separate subsection when there are enough items to warrant it)
80
78
- `#### Administration` — System Console features, logging, support packet changes
@@ -87,15 +85,15 @@
87
85
- `### Go Version` — Always include this section. The Go version content will be injected automatically — output only this heading with no content beneath it.
88
86
- `### Open Source Components` — open source component additions or removals. Format each item as: "Added ``<package>`` to <repo_url>." or "Removed ``<package>`` from <repo_url>." Example: "Added ``x/text`` to https://github.com/mattermost/mattermost/." Only include if there are relevant notes.
89
87
- `### Security` — security-related fixes not already covered under Bug Fixes
90
-
88
+
91
89
2. **Sentence patterns:** Follow these conventions consistently:
92
90
- New features and additions: "Added [feature]..." or "Added support for [feature]..."
93
91
- Bug fixes: "Fixed an issue where..." or "Fixed an issue with..." — never use "Fixed a bug"; always use "Fixed an issue".
94
92
- Improvements to existing things: "Improved [thing]..." or "Updated [thing]..."
95
93
- Removals: "Removed [thing]..."
96
-
97
-
3. **Terminology:** Always write "user interface" in full — never use the abbreviation "UI".
98
-
94
+
95
+
3. **Terminology:** Always write "user interface" in full — never use the abbreviation "UI". Always spell out messaging abbreviations: "DM" → "Direct Message", "GM" → "Group Message", "DM/GM" → "Direct/Group Message".
96
+
99
97
4. **Code formatting:** Use double backticks for all of the following:
- Package names in Open Source Components (e.g., ``x/text``)
108
-
109
-
5. **Markdown formatting:** Indent each bullet point with two spaces (e.g., ` - item`). Ensure correct and clean Markdown syntax throughout. Do not insert horizontal rules (`---`) or any other separators between sections. Do not add a blank line between a heading and its first bullet.
110
-
106
+
107
+
5. **Markdown formatting:** Indent each bullet point with two spaces (e.g., ` - item`). Ensure correct and clean Markdown syntax throughout. Do not insert horizontal rules (`---`) or any other separators between sections. Do not add a blank line between a section/subsection heading and its first bullet point.
108
+
111
109
6. **License requirements:** When a feature requires a specific Mattermost license, note it inline at the end of the bullet point (e.g., "Requires Enterprise Advanced license" or "Requires Enterprise license").
112
-
113
-
7. **Proofreading:** Correct any typos, grammatical errors, awkward phrasing, or inconsistencies. Replace any instance of "Fixed a bug" with "Fixed an issue". Aim for clear, concise, and professional language.
114
-
115
-
8. **Tone:** Maintain a neutral, informative, and professional tone consistent with technical documentation.
116
-
117
-
9. **Focus:** Output only the section content (headings and bullet points). Do not include the release version header line or any introductory or concluding remarks from yourself."""
118
-
119
-
110
+
111
+
7. **One section per release note:** Each raw release note must appear in exactly one section — whichever section best fits its primary purpose. Do not split a single release note across multiple sections or subsections, even if it touches more than one area (e.g. an admin feature that also introduces an API endpoint belongs entirely in Administration, not partially in Administration and partially in API Changes).
112
+
113
+
8. **Proofreading:** Correct any typos, grammatical errors, awkward phrasing, or inconsistencies. Replace any instance of "Fixed a bug" with "Fixed an issue". Aim for clear, concise, and professional language.
114
+
115
+
9. **Tone:** Maintain a neutral, informative, and professional tone consistent with technical documentation.
116
+
117
+
10. **Focus:** Output only the section content (headings and bullet points). Do not include the release version header line or any introductory or concluding remarks from yourself."""
0 commit comments