Skip to content

Commit d9509ee

Browse files
committed
feat: add versioning tips
1 parent a658ca0 commit d9509ee

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

internal/git/git.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,13 +911,24 @@ func (g *Git) generatePRTitleAndBody(info PRInfo, labelTypes map[string]github.L
911911
if labelBumpType != nil && *labelBumpType != versioning.BumpCustom && *labelBumpType != versioning.BumpNone {
912912
// be very careful if changing this it critically aligns with a regex in parseBumpFromPRBody
913913
versionBumpMsg := "Version Bump Type: " + fmt.Sprintf("[%s]", string(*labelBumpType)) + " - "
914+
914915
if info.VersioningInfo.ManualBump {
915916
versionBumpMsg += string(versionbumps.BumpMethodManual) + " (manual)"
916917
// if manual we bold the message
917918
versionBumpMsg = "**" + versionBumpMsg + "**"
918919
versionBumpMsg += fmt.Sprintf("\n\nThis PR will stay on the current version until the %s label is removed and/or modified.", string(*labelBumpType))
919920
} else {
920921
versionBumpMsg += string(versionbumps.BumpMethodAutomated) + " (automated)"
922+
923+
versionBumpMsg += "\n\n> [!TIP]"
924+
switch *labelBumpType {
925+
case versioning.BumpPrerelease:
926+
versionBumpMsg += "\n> To exit [pre-release versioning](https://www.speakeasy.com/docs/sdks/manage/versioning#pre-release-version-bumps), set a new version or run `speakeasy bump graduate`."
927+
case versioning.BumpPatch, versioning.BumpMinor:
928+
versionBumpMsg += "\n> If updates to your OpenAPI document introduce breaking changes, be sure to update the `info.version` field to [trigger the correct version bump](https://www.speakeasy.com/docs/sdks/manage/versioning#openapi-document-changes)."
929+
}
930+
931+
versionBumpMsg += "\n> Speakeasy supports manual control of SDK versioning through [multiple methods](https://www.speakeasy.com/docs/sdks/manage/versioning#manual-version-bumps)."
921932
}
922933
body += fmt.Sprintf(`## Versioning
923934

0 commit comments

Comments
 (0)