feat(task-017): implement git publishing dry-run and commit flow
This commit is contained in:
@@ -3021,6 +3021,37 @@
|
||||
"title": "PlanUpdateRequest",
|
||||
"type": "object"
|
||||
},
|
||||
"PublishCommitCreateResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"article": {
|
||||
"$ref": "#/components/schemas/ArticleSummary"
|
||||
},
|
||||
"publish_commit": {
|
||||
"$ref": "#/components/schemas/PublishCommitSummary"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"article",
|
||||
"publish_commit"
|
||||
],
|
||||
"title": "PublishCommitCreateResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"PublishCommitListResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"commits": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/PublishCommitSummary"
|
||||
},
|
||||
"title": "Commits",
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"title": "PublishCommitListResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"PublishCommitSummary": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -3099,6 +3130,41 @@
|
||||
"title": "PublishCommitSummary",
|
||||
"type": "object"
|
||||
},
|
||||
"PublishingDryRunResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"article": {
|
||||
"$ref": "#/components/schemas/ArticleSummary"
|
||||
},
|
||||
"content_shape_valid": {
|
||||
"title": "Content Shape Valid",
|
||||
"type": "boolean"
|
||||
},
|
||||
"errors": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "Errors",
|
||||
"type": "array"
|
||||
},
|
||||
"publish_commit": {
|
||||
"$ref": "#/components/schemas/PublishCommitSummary"
|
||||
},
|
||||
"validation_label": {
|
||||
"minLength": 1,
|
||||
"title": "Validation Label",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"article",
|
||||
"publish_commit",
|
||||
"content_shape_valid",
|
||||
"validation_label"
|
||||
],
|
||||
"title": "PublishingDryRunResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"PublishingRules": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -3181,6 +3247,47 @@
|
||||
"title": "PublishingStatus",
|
||||
"type": "string"
|
||||
},
|
||||
"PublishingStatusResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"article": {
|
||||
"$ref": "#/components/schemas/ArticleSummary"
|
||||
},
|
||||
"latest_dry_run": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PublishCommitSummary"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"latest_publish_commit": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PublishCommitSummary"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"validation_label": {
|
||||
"minLength": 1,
|
||||
"title": "Validation Label",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"article",
|
||||
"validation_label"
|
||||
],
|
||||
"title": "PublishingStatusResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ResearchArtifactManifestSummary": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -6931,6 +7038,242 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/articles/{article_id}/publishing/commits": {
|
||||
"get": {
|
||||
"operationId": "get_article_publishing_commits_api_articles__article_id__publishing_commits_get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "article_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Article Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PublishCommitListResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Get Article Publishing Commits",
|
||||
"tags": [
|
||||
"publishing"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/articles/{article_id}/publishing/create-commit": {
|
||||
"post": {
|
||||
"operationId": "post_publishing_create_commit_api_articles__article_id__publishing_create_commit_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "article_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Article Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PublishCommitCreateResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Post Publishing Create Commit",
|
||||
"tags": [
|
||||
"publishing"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/articles/{article_id}/publishing/dry-run": {
|
||||
"post": {
|
||||
"operationId": "post_publishing_dry_run_api_articles__article_id__publishing_dry_run_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "article_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Article Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PublishingDryRunResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Post Publishing Dry Run",
|
||||
"tags": [
|
||||
"publishing"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/articles/{article_id}/publishing/status": {
|
||||
"get": {
|
||||
"operationId": "get_article_publishing_status_api_articles__article_id__publishing_status_get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "article_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"title": "Article Id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "X-Demo-User-Email",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "X-Demo-User-Email"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PublishingStatusResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Get Article Publishing Status",
|
||||
"tags": [
|
||||
"publishing"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/articles/{article_id}/research": {
|
||||
"get": {
|
||||
"operationId": "get_research_api_articles__article_id__research_get",
|
||||
|
||||
@@ -496,6 +496,15 @@ export type PlanUpdateRequest = {
|
||||
visual_needs?: string[] | null;
|
||||
};
|
||||
|
||||
export type PublishCommitCreateResponse = {
|
||||
article: ArticleSummary;
|
||||
publish_commit: PublishCommitSummary;
|
||||
};
|
||||
|
||||
export type PublishCommitListResponse = {
|
||||
commits?: PublishCommitSummary[];
|
||||
};
|
||||
|
||||
export type PublishCommitSummary = {
|
||||
article_id: string;
|
||||
branch: string;
|
||||
@@ -509,6 +518,14 @@ export type PublishCommitSummary = {
|
||||
target_site_id: string;
|
||||
};
|
||||
|
||||
export type PublishingDryRunResponse = {
|
||||
article: ArticleSummary;
|
||||
content_shape_valid: boolean;
|
||||
errors?: string[];
|
||||
publish_commit: PublishCommitSummary;
|
||||
validation_label: string;
|
||||
};
|
||||
|
||||
export type PublishingRules = {
|
||||
asset_path_template: string;
|
||||
content_format?: string;
|
||||
@@ -522,6 +539,13 @@ export type PublishingRules = {
|
||||
|
||||
export type PublishingStatus = "PUBLISH_NOT_STARTED" | "PUBLISH_DRY_RUN_REQUIRED" | "PUBLISH_DRY_RUN_RUNNING" | "PUBLISH_DRY_RUN_FAILED" | "PUBLISH_COMMIT_READY" | "PUBLISH_COMMIT_CREATED" | "PUBLISH_VERIFICATION_FAILED";
|
||||
|
||||
export type PublishingStatusResponse = {
|
||||
article: ArticleSummary;
|
||||
latest_dry_run?: PublishCommitSummary | null;
|
||||
latest_publish_commit?: PublishCommitSummary | null;
|
||||
validation_label: string;
|
||||
};
|
||||
|
||||
export type ResearchArtifactManifestSummary = {
|
||||
agent_job_id: string;
|
||||
article_id: string;
|
||||
|
||||
Reference in New Issue
Block a user