Publish release
POST
/api/projects/{projectId}/releases/{releaseId}/publishThành viên đã đăng nhập
REST client gọi POST /api/projects/{projectId}/releases/{releaseId}/publish. Lời gọi trả về release với status, publishedAt, publisherName và notes. Trước khi publish, preview nhóm các thay đổi hiện có của release vào các section của release note; sau khi publish, preview rỗng và các release note nằm trong notes. markdown là null, trừ release được publish trước Flyway V13. Publish một release chưa duyệt trả về 409 release_status_conflict; mọi thao tác trên một release đã publish trả về 409 release_published.
Tham số đường dẫn
| Tên | Kiểu | Bắt buộc | Ghi chú |
|---|---|---|---|
projectId | string (uuid) | Bắt buộc | |
releaseId | string (uuid) | Bắt buộc |
Response
Thành công: 200
| Trường | Kiểu | Bắt buộc | Ghi chú |
|---|---|---|---|
id | string (uuid) | Tùy chọn | |
projectId | string (uuid) | Tùy chọn | |
version | string | Tùy chọn | |
summary | string | Tùy chọn | |
status | enum ReleaseStatus | Tùy chọn | DRAFTIN_REVIEWAPPROVEDPUBLISHED |
createdAt | string (date-time) | Tùy chọn | |
updatedAt | string (date-time) | Tùy chọn | |
plannedReleaseAt | string (date-time) | Tùy chọn | |
upgradeGuideUrl | string | Tùy chọn | |
previousReleaseId | string (uuid) | Tùy chọn | |
previousVersion | string | Tùy chọn | |
changes | array of ChangeView | Tùy chọn | |
changes[].id | string (uuid) | Tùy chọn | |
changes[].pullRequestNumber | integer | Tùy chọn | |
changes[].title | string | Tùy chọn | |
changes[].description | string | Tùy chọn | |
changes[].authorLogin | string | Tùy chọn | |
changes[].labels | array of string | Tùy chọn | |
changes[].targetBranch | string | Tùy chọn | |
changes[].mergeCommitSha | string | Tùy chọn | |
changes[].mergedAt | string (date-time) | Tùy chọn | |
changes[].url | string | Tùy chọn | |
changes[].category | string | Tùy chọn | |
changes[].categoryName | string | Tùy chọn | |
changes[].categoryGroup | enum CategoryGroup | Tùy chọn | FEATUREFIXPERFORMANCEDOCUMENTATIONMAINTENANCEOTHER |
changes[].breaking | boolean | Tùy chọn | |
changes[].security | boolean | Tùy chọn | |
changes[].needsReview | boolean | Tùy chọn | |
changes[].reasons | array of string | Tùy chọn | |
changes[].classificationSource | enum ClassificationSource | Tùy chọn | RULESAISUGGESTIONHUMAN |
changes[].aiStatus | enum AiStatus | Tùy chọn | NOT_REQUESTEDSUCCEEDEDFAILED |
changes[].aiModel | string | Tùy chọn | |
changes[].aiFailure | string | Tùy chọn | |
changes[].aiEligible | boolean | Tùy chọn | |
changes[].reviewedBy | string (uuid) | Tùy chọn | |
changes[].reviewerName | string | Tùy chọn | |
changes[].reviewedAt | string (date-time) | Tùy chọn | |
changes[].processingStatus | enum ProcessingStatus | Tùy chọn | PROCESSINGCOMPLETED |
changes[].changedFileStatus | enum ChangedFileStatus | Tùy chọn | COLLECTEDUNAVAILABLENOT_SUPPORTED |
changes[].linkedContextStatus | enum LinkedContextStatus | Tùy chọn | NOT_SUPPORTEDNOT_CONFIGUREDNOT_FOUNDPARTIALUNAVAILABLECOLLECTED |
changes[].linkedIssues | array of LinkedIssue | Tùy chọn | |
changes[].changedFiles | array of ChangedFile | Tùy chọn | |
changes[].reviewTriggers | array of ReviewTrigger | Tùy chọn | |
changes[].neutralSummary | NeutralSummary | Tùy chọn | |
changes[].contentLanguage | string | Tùy chọn | |
changes[].aiProvider | enum AiProvider | Tùy chọn | OPENAIANTHROPICDEEPSEEK |
changes[].audienceNarrativeDetails | map of AudienceNarrative | Tùy chọn | |
changes[].summaryEditorName | string | Tùy chọn | |
changes[].summaryEditedAt | string (date-time) | Tùy chọn | |
changes[].context | ContextAssessment | Tùy chọn | |
changes[].sourceId | string (uuid) | Tùy chọn | |
changes[].origin | enum ChangeOrigin | Tùy chọn | WEBHOOKIMPORT |
changes[].sourceType | enum SourceType | Tùy chọn | GITHUBGITLABLINEARJIRA |
changes[].exclusion | ChangeExclusion | Tùy chọn | |
decisions | array of ReleaseDecisionView | Tùy chọn | |
decisions[].changeId | string (uuid) | Tùy chọn | |
decisions[].action | enum ReviewAction | Tùy chọn | APPROVEEDIT |
decisions[].reviewerName | string | Tùy chọn | |
decisions[].note | string | Tùy chọn | |
decisions[].decidedAt | string (date-time) | Tùy chọn | |
decisions[].foldedChangeId | string (uuid) | Tùy chọn | |
reviewedCount | integer | Tùy chọn | |
preview | array of ReleaseNoteSection | Tùy chọn | |
preview[].title | string | Tùy chọn | |
preview[].items | array of ReleaseNoteItem | Tùy chọn | |
approvedAt | string (date-time) | Tùy chọn | |
approverName | string | Tùy chọn | |
publishedAt | string (date-time) | Tùy chọn | |
publisherName | string | Tùy chọn | |
markdown | string | Tùy chọn | |
notes | array of AudienceNoteView | Tùy chọn | |
notes[].id | string (uuid) | Tùy chọn | |
notes[].audienceId | string (uuid) | Tùy chọn | |
notes[].audienceCode | string | Tùy chọn | |
notes[].audienceName | string | Tùy chọn | |
notes[].language | string | Tùy chọn | |
notes[].content | string | Tùy chọn | |
notes[].autoRerender | boolean | Tùy chọn | |
notes[].lastEditorName | string | Tùy chọn | |
notes[].updatedAt | string (date-time) | Tùy chọn | |
notes[].translationStatus | enum TranslationState.Status | Tùy chọn | READYPENDINGFAILED |
notes[].glossaryStatus | enum GlossaryUse.Status | Tùy chọn | NONEPENDINGAPPLIEDNOT_APPLIED |
notes[].glossaryReason | string | Tùy chọn | |
glossaries | array of ReleaseGlossaryView | Tùy chọn | |
glossaries[].language | string | Tùy chọn | |
glossaries[].status | enum GlossaryUse.Status | Tùy chọn | NONEPENDINGAPPLIEDNOT_APPLIED |
glossaries[].reason | string | Tùy chọn | |
linkedIssues | array of LinkedIssueStatusView | Tùy chọn | |
linkedIssues[].tracker | string | Tùy chọn | |
linkedIssues[].key | string | Tùy chọn | |
linkedIssues[].title | string | Tùy chọn | |
linkedIssues[].url | string | Tùy chọn | |
linkedIssues[].changeReferences | array of string | Tùy chọn | |
linkedIssues[].recordedStatus | string | Tùy chọn | |
linkedIssues[].statusAtReview | string | Tùy chọn | |
linkedIssues[].read | boolean | Tùy chọn | |
linkedIssues[].status | string | Tùy chọn | |
linkedIssues[].open | boolean | Tùy chọn | |
linkedIssues[].accepted | boolean | Tùy chọn | |
linkedIssues[].accepterName | string | Tùy chọn | |
linkedIssues[].acceptedAt | string (date-time) | Tùy chọn | |
linkedIssueRead | string | Tùy chọn | |
foldingSuggestions | array of FoldingSuggestion | Tùy chọn | |
foldingSuggestions[].trackerChangeId | string (uuid) | Tùy chọn | |
foldingSuggestions[].trackerReference | string | Tùy chọn | |
foldingSuggestions[].trackerTitle | string | Tùy chọn | |
foldingSuggestions[].codeChangeId | string (uuid) | Tùy chọn | |
foldingSuggestions[].codeReference | string | Tùy chọn | |
foldingSuggestions[].codeTitle | string | Tùy chọn | |
foldingSuggestions[].evidence | enum ReleaseFoldDecision.Evidence | Tùy chọn | LINKED_KEYCONFIRMED_DUPLICATE |
foldingSuggestions[].issueKey | string | Tùy chọn | |
foldingSuggestions[].confirmedBy | string | Tùy chọn | |
foldingSuggestions[].addsBreaking | boolean | Tùy chọn | |
foldingSuggestions[].addsSecurity | boolean | Tùy chọn | |
foldDecisions | array of FoldDecisionView | Tùy chọn | |
foldDecisions[].trackerChangeId | string (uuid) | Tùy chọn | |
foldDecisions[].codeChangeId | string (uuid) | Tùy chọn | |
foldDecisions[].evidence | enum ReleaseFoldDecision.Evidence | Tùy chọn | LINKED_KEYCONFIRMED_DUPLICATE |
foldDecisions[].issueKey | string | Tùy chọn | |
foldDecisions[].decision | enum ReleaseFoldDecision.Decision | Tùy chọn | ACCEPTEDDISMISSED |
foldDecisions[].removal | enum ReleaseFoldDecision.Removal | Tùy chọn | REJECTEDEXCLUDED |
foldDecisions[].reason | string | Tùy chọn | |
foldDecisions[].deciderName | string | Tùy chọn | |
foldDecisions[].decidedAt | string (date-time) | Tùy chọn | |
foldDecisions[].addsBreaking | boolean | Tùy chọn | |
foldDecisions[].addsSecurity | boolean | Tùy chọn | |
missingNarratives | array of MissingNarrative | Tùy chọn | |
missingNarratives[].changeId | string (uuid) | Tùy chọn | |
missingNarratives[].reference | string | Tùy chọn | |
missingNarratives[].title | string | Tùy chọn | |
missingNarratives[].audienceNames | array of string | Tùy chọn | |
missingNarratives[].estimatedTokens | integer | Tùy chọn |
Lỗi
| Trạng thái | Mã | Áp dụng cho |
|---|---|---|
400 | validation_failedthiếu trường hoặc giá trị nằm ngoài khoảng cho phép | Mọi endpoint |
400 | invalid_parametermột tham số trên đường dẫn hoặc query bị thiếu hoặc không chuyển đổi được, chẳng hạn một ID không phải UUID | Mọi endpoint |
401 | authentication_requiredchưa có phiên đăng nhập | Mọi endpoint |
403 | access_deniedendpoint dành cho quản trị viên, hoặc CSRF token thiếu hay đã cũ | Mọi endpoint |
404 | not_foundkhông có địa chỉ đó | Mọi endpoint |
405 | method_not_allowedđịa chỉ không nhận phương thức đó | Mọi endpoint |
415 | unsupported_media_typeđịa chỉ không đọc body thuộc kiểu đó | Mọi endpoint |
500 | internal_errormột lỗi ReleaseFlow không lường trước; body không bao giờ chứa exception gây ra nó | Mọi endpoint |
400 | template_invalid | Khu vực Audiences |
400 | template_narratives_path | Khu vực Audiences |
400 | template_language_not_targeted | Khu vực Audiences |
400 | invalid_release_languages | Khu vực Audiences |
404 | audience_not_found | Khu vực Audiences |
409 | audience_code_taken | Khu vực Audiences |
409 | audience_limit | Khu vực Audiences |
409 | audience_last | Khu vực Audiences |
409 | audience_last_active | Khu vực Audiences |
409 | audience_already_retired | Khu vực Audiences |
409 | audience_not_retired | Khu vực Audiences |
409 | audience_in_use | Khu vực Audiences |
409 | audience_not_preset | Khu vực Audiences |
404 | glossary_term_not_found | Khu vực Glossary |
409 | glossary_term_taken | Khu vực Glossary |
409 | glossary_limit | Khu vực Glossary |
400 | invalid_release_schedule | Khu vực Releases |
400 | invalid_upgrade_guide_url | Khu vực Releases |
400 | invalid_previous_release | Khu vực Releases |
400 | invalid_fold_decision | Khu vực Releases |
404 | release_not_found | Khu vực Releases |
404 | release_note_not_found | Khu vực Releases |
404 | folding_suggestion_not_found | Khu vực Releases |
404 | linked_issue_not_found | Khu vực Releases |
409 | release_status_conflict | Khu vực Releases |
409 | release_published | Khu vực Releases |
409 | release_empty | Khu vực Releases |
409 | release_review_incomplete | Khu vực Releases |
409 | change_summary_required | Khu vực Releases |
409 | release_version_taken | Khu vực Releases |
409 | classification_changed | Khu vực Releases |
409 | change_not_releasable | Khu vực Releases |
409 | change_excluded | Khu vực Releases |
409 | release_note_render_failed | Khu vực Releases |
409 | release_notes_missing | Khu vực Releases |
409 | translations_not_ready | Khu vực Releases |
409 | linked_issue_status_changed | Khu vực Releases |
Request
bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X POST "http://localhost:8080/api/projects/$PROJECT_ID/releases/$RELEASE_ID/publish" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN"
Response
200Ví dụ
{
"id": "<uuid>",
"projectId": "<uuid>",
"version": "<string>",
"summary": "<string>",
"status": "DRAFT",
"createdAt": "<date-time>",
"updatedAt": "<date-time>",
"plannedReleaseAt": "<date-time>",
"upgradeGuideUrl": "<string>",
"previousReleaseId": "<uuid>",
"previousVersion": "<string>",
"changes": [
{
"id": "<uuid>",
"pullRequestNumber": 0,
"title": "<string>",
"description": "<string>",
"authorLogin": "<string>",
"labels": [
"<string>"
],
"targetBranch": "<string>",
"mergeCommitSha": "<string>",
"mergedAt": "<date-time>",
"url": "<string>",
"category": "<string>",
"categoryName": "<string>",
"categoryGroup": "FEATURE",
"breaking": false,
"security": false,
"needsReview": false,
"reasons": [
"<string>"
],
"classificationSource": "RULES",
"aiStatus": "NOT_REQUESTED",
"aiModel": "<string>",
"aiFailure": "<string>",
"aiEligible": false,
"reviewedBy": "<uuid>",
"reviewerName": "<string>",
"reviewedAt": "<date-time>",
"processingStatus": "PROCESSING",
"changedFileStatus": "COLLECTED",
"linkedContextStatus": "NOT_SUPPORTED",
"linkedIssues": [
{}
],
"changedFiles": [
{}
],
"reviewTriggers": [
{}
],
"neutralSummary": {
"whatChanged": "<string>",
"whyChanged": "<string>",
"technicalDetail": "<string>",
"migrationStep": "<string>",
"migrationKind": "NONE",
"limitations": "<string>"
},
"contentLanguage": "<string>",
"aiProvider": "OPENAI",
"audienceNarrativeDetails": {
"<key>": {}
},
"summaryEditorName": "<string>",
"summaryEditedAt": "<date-time>",
"context": {
"score": 0,
"status": "SUFFICIENT",
"reasons": []
},
"sourceId": "<uuid>",
"origin": "WEBHOOK",
"sourceType": "GITHUB",
"exclusion": {
"excludedBy": "<uuid>",
"excluderName": "<string>",
"excludedAt": "<date-time>",
"reason": "<string>"
}
}
],
"decisions": [
{
"changeId": "<uuid>",
"action": "APPROVE",
"reviewerName": "<string>",
"note": "<string>",
"decidedAt": "<date-time>",
"foldedChangeId": "<uuid>"
}
],
"reviewedCount": 0,
"preview": [
{
"title": "<string>",
"items": [
{}
]
}
],
"approvedAt": "<date-time>",
"approverName": "<string>",
"publishedAt": "<date-time>",
"publisherName": "<string>",
"markdown": "<string>",
"notes": [
{
"id": "<uuid>",
"audienceId": "<uuid>",
"audienceCode": "<string>",
"audienceName": "<string>",
"language": "<string>",
"content": "<string>",
"autoRerender": false,
"lastEditorName": "<string>",
"updatedAt": "<date-time>",
"translationStatus": "READY",
"glossaryStatus": "NONE",
"glossaryReason": "<string>"
}
],
"glossaries": [
{
"language": "<string>",
"status": "NONE",
"reason": "<string>"
}
],
"linkedIssues": [
{
"tracker": "<string>",
"key": "<string>",
"title": "<string>",
"url": "<string>",
"changeReferences": [
"<string>"
],
"recordedStatus": "<string>",
"statusAtReview": "<string>",
"read": false,
"status": "<string>",
"open": false,
"accepted": false,
"accepterName": "<string>",
"acceptedAt": "<date-time>"
}
],
"linkedIssueRead": "<string>",
"foldingSuggestions": [
{
"trackerChangeId": "<uuid>",
"trackerReference": "<string>",
"trackerTitle": "<string>",
"codeChangeId": "<uuid>",
"codeReference": "<string>",
"codeTitle": "<string>",
"evidence": "LINKED_KEY",
"issueKey": "<string>",
"confirmedBy": "<string>",
"addsBreaking": false,
"addsSecurity": false
}
],
"foldDecisions": [
{
"trackerChangeId": "<uuid>",
"codeChangeId": "<uuid>",
"evidence": "LINKED_KEY",
"issueKey": "<string>",
"decision": "ACCEPTED",
"removal": "REJECTED",
"reason": "<string>",
"deciderName": "<string>",
"decidedAt": "<date-time>",
"addsBreaking": false,
"addsSecurity": false
}
],
"missingNarratives": [
{
"changeId": "<uuid>",
"reference": "<string>",
"title": "<string>",
"audienceNames": [
"<string>"
],
"estimatedTokens": 0
}
]
}