Skip to content

feat: some new api frame#1933

Merged
genedna merged 1 commit into
gitmono-dev:mainfrom
topshihun:dev
Feb 13, 2026
Merged

feat: some new api frame#1933
genedna merged 1 commit into
gitmono-dev:mainfrom
topshihun:dev

Conversation

@topshihun

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Wangyan <topshihun@foxmail.com>
@genedna

genedna commented Feb 12, 2026

Copy link
Copy Markdown
Collaborator

@codex review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new API framework for Orion server with four v2 endpoints for task retry, task retrieval, build event retrieval, and target retrieval. The changes include three new database entity models (orion_tasks, build_events, build_targets) that define the data structures for these operations, along with OpenAPI schema definitions.

Changes:

  • Added three new SeaORM entity models for orion_tasks, build_events, and build_targets tables
  • Added four new v2 API endpoints with OpenAPI documentation
  • Registered new DTOs and handlers in OpenAPI schema

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
orion-server/src/server.rs Added new API handler imports and DTO schema registrations to OpenAPI configuration
orion-server/src/model/orion_tasks.rs New entity model for orion_tasks table with relationships to build_events and build_targets
orion-server/src/model/mod.rs Module declarations for new entities (currently commented out)
orion-server/src/model/build_targets.rs New entity model for build_targets table with foreign key to orion_tasks
orion-server/src/model/build_events.rs New entity model for build_events table with foreign key to orion_tasks
orion-server/src/api.rs Added four new v2 API endpoints (task-retry, task, build-event, target) with stub implementations and DTOs

Comment thread orion-server/src/model/mod.rs
Comment thread orion-server/src/api.rs
Comment thread orion-server/src/api.rs
Comment thread orion-server/src/api.rs
Comment thread orion-server/src/api.rs
#[utoipa::path(
get,
path = "v2/task/{cl}",
params(("cl" = String, Path, description = "cl")),

Copilot AI Feb 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description "cl" for the path parameter is too vague. Based on the context and existing codebase patterns (e.g., cl_id in tasks model), this appears to be a Change List identifier. The description should be more descriptive, such as "Change List identifier".

Suggested change
params(("cl" = String, Path, description = "cl")),
params(("cl" = String, Path, description = "Change List identifier")),

Copilot uses AI. Check for mistakes.
Comment thread orion-server/src/api.rs
.route("/v2/task-retry/{id}", post(task_retry_handler))
.route("/v2/task/{cl}", get(task_get_handler))
.route("/v2/build-event/{task-id}", get(build_event_get_handler))
.route("/v2/target/{task-id}", get(target_get_handler))

Copilot AI Feb 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path parameter uses a hyphen 'task-id' which is inconsistent with the existing codebase conventions. All other route parameters in this file use underscores (e.g., 'task_id' at line 108, 'target_id' at line 106). The parameter should be '{task_id}' with an underscore to match the rest of the codebase.

Copilot uses AI. Check for mistakes.
Comment thread orion-server/src/api.rs
Comment thread orion-server/src/api.rs
Comment thread orion-server/src/api.rs
Comment thread orion-server/src/api.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc1150bf56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread orion-server/src/api.rs
Comment thread orion-server/src/api.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@genedna genedna merged commit 9907f04 into gitmono-dev:main Feb 13, 2026
17 checks passed
@benjamin-747

Copy link
Copy Markdown
Collaborator

link #1852

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants