2017-04-16 06:51:04 -06:00
|
|
|
// Copyright 2017 The Gitea Authors. All rights reserved.
|
2022-11-27 11:20:29 -07:00
|
|
|
// SPDX-License-Identifier: MIT
|
2017-04-16 06:51:04 -06:00
|
|
|
|
2019-05-11 04:21:34 -06:00
|
|
|
package structs
|
2017-04-16 06:51:04 -06:00
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2020-12-17 20:33:32 -07:00
|
|
|
// CommitStatus holds a single status of a single Commit
|
|
|
|
type CommitStatus struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
State CommitStatusState `json:"status"`
|
|
|
|
TargetURL string `json:"target_url"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
Context string `json:"context"`
|
|
|
|
Creator *User `json:"creator"`
|
2017-11-13 00:02:25 -07:00
|
|
|
// swagger:strfmt date-time
|
2018-03-05 18:22:16 -07:00
|
|
|
Created time.Time `json:"created_at"`
|
2017-11-13 00:02:25 -07:00
|
|
|
// swagger:strfmt date-time
|
2018-03-05 18:22:16 -07:00
|
|
|
Updated time.Time `json:"updated_at"`
|
2017-04-16 06:51:04 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// CombinedStatus holds the combined state of several statuses for a single commit
|
|
|
|
type CombinedStatus struct {
|
2020-12-17 20:33:32 -07:00
|
|
|
State CommitStatusState `json:"state"`
|
|
|
|
SHA string `json:"sha"`
|
|
|
|
TotalCount int `json:"total_count"`
|
|
|
|
Statuses []*CommitStatus `json:"statuses"`
|
|
|
|
Repository *Repository `json:"repository"`
|
|
|
|
CommitURL string `json:"commit_url"`
|
|
|
|
URL string `json:"url"`
|
2017-04-16 06:51:04 -06:00
|
|
|
}
|
|
|
|
|
2020-12-17 20:33:32 -07:00
|
|
|
// CreateStatusOption holds the information needed to create a new CommitStatus for a Commit
|
2017-04-16 06:51:04 -06:00
|
|
|
type CreateStatusOption struct {
|
2020-12-17 20:33:32 -07:00
|
|
|
State CommitStatusState `json:"state"`
|
|
|
|
TargetURL string `json:"target_url"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
Context string `json:"context"`
|
2017-04-16 06:51:04 -06:00
|
|
|
}
|