2
0
Files
logikonline 12f4ea03a8
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Trigger Vault Plugin Rebuild / Trigger Vault Rebuild (push) Successful in 0s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 2m48s
Build and Release / Lint (push) Failing after 5m2s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 5m37s
refactor: add /v3 suffix to module path for proper Go semver
Go's semantic import versioning requires v2+ modules to include the
major version in the module path. This enables using proper version
tags (v3.x.x) instead of pseudo-versions.

Updated module path: code.gitcaddy.com/server/v3
2026-01-17 17:53:59 -05:00

63 lines
2.3 KiB
Go

// Copyright 2017 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package structs
import (
"time"
"code.gitcaddy.com/server/v3/modules/commitstatus"
)
// CommitStatus holds a single status of a single Commit
type CommitStatus struct {
// ID is the unique identifier for the commit status
ID int64 `json:"id"`
// State represents the status state (pending, success, error, failure)
State commitstatus.CommitStatusState `json:"status"`
// TargetURL is the URL to link to for more details
TargetURL string `json:"target_url"`
// Description provides a brief description of the status
Description string `json:"description"`
// URL is the API URL for this status
URL string `json:"url"`
// Context is the unique context identifier for the status
Context string `json:"context"`
// Creator is the user who created the status
Creator *User `json:"creator"`
// swagger:strfmt date-time
Created time.Time `json:"created_at"`
// swagger:strfmt date-time
Updated time.Time `json:"updated_at"`
}
// CombinedStatus holds the combined state of several statuses for a single commit
type CombinedStatus struct {
// State is the overall combined status state
State commitstatus.CommitStatusState `json:"state"`
// SHA is the commit SHA this status applies to
SHA string `json:"sha"`
// TotalCount is the total number of statuses
TotalCount int `json:"total_count"`
// Statuses contains all individual commit statuses
Statuses []*CommitStatus `json:"statuses"`
// Repository is the repository this status belongs to
Repository *Repository `json:"repository"`
// CommitURL is the API URL for the commit
CommitURL string `json:"commit_url"`
// URL is the API URL for this combined status
URL string `json:"url"`
}
// CreateStatusOption holds the information needed to create a new CommitStatus for a Commit
type CreateStatusOption struct {
// State represents the status state to set (pending, success, error, failure)
State commitstatus.CommitStatusState `json:"state"`
// TargetURL is the URL to link to for more details
TargetURL string `json:"target_url"`
// Description provides a brief description of the status
Description string `json:"description"`
// Context is the unique context identifier for the status
Context string `json:"context"`
}