Merge pull request 'add object_format_name
back in' (#51) from object-format-name into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-api/pulls/51
This commit is contained in:
commit
757648345e
|
@ -5,10 +5,10 @@ steps:
|
||||||
image: rust
|
image: rust
|
||||||
environment:
|
environment:
|
||||||
- "FORGEJO_API_CI_INSTANCE_URL=http://forgejo-testing:3000/"
|
- "FORGEJO_API_CI_INSTANCE_URL=http://forgejo-testing:3000/"
|
||||||
- FORGEJO_API_CI_TOKEN=6c340bf9ed25adf28701f618fda5f82c934db1f3
|
- FORGEJO_API_CI_TOKEN=3906093e3d85cf0402623eb4a5287bc0f828e820
|
||||||
commands:
|
commands:
|
||||||
- cargo test
|
- cargo test
|
||||||
|
|
||||||
services:
|
services:
|
||||||
forgejo-testing:
|
forgejo-testing:
|
||||||
image: code.cartoon-aa.xyz/cyborus/ci-forgejo:7.0.0
|
image: code.cartoon-aa.xyz/cyborus/ci-forgejo:7.0.1
|
||||||
|
|
|
@ -688,6 +688,7 @@ pub struct CreateRepoOption {
|
||||||
pub license: Option<String>,
|
pub license: Option<String>,
|
||||||
/// Name of the repository to create
|
/// Name of the repository to create
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
pub object_format_name: Option<ObjectFormatName>,
|
||||||
/// Whether the repository is private
|
/// Whether the repository is private
|
||||||
pub private: Option<bool>,
|
pub private: Option<bool>,
|
||||||
/// Readme of the repository to create
|
/// Readme of the repository to create
|
||||||
|
@ -1859,6 +1860,15 @@ pub struct OAuth2Application {
|
||||||
pub redirect_uris: Option<Vec<String>>,
|
pub redirect_uris: Option<Vec<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// ObjectFormatName of the underlying git repository
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
||||||
|
pub enum ObjectFormatName {
|
||||||
|
#[serde(rename = "sha1")]
|
||||||
|
Sha1,
|
||||||
|
#[serde(rename = "sha256")]
|
||||||
|
Sha256,
|
||||||
|
}
|
||||||
/// Organization represents an organization
|
/// Organization represents an organization
|
||||||
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||||
pub struct Organization {
|
pub struct Organization {
|
||||||
|
@ -2256,6 +2266,7 @@ pub struct Repository {
|
||||||
#[serde(with = "time::serde::rfc3339::option")]
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
pub mirror_updated: Option<time::OffsetDateTime>,
|
pub mirror_updated: Option<time::OffsetDateTime>,
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
|
pub object_format_name: Option<ObjectFormatName>,
|
||||||
pub open_issues_count: Option<u64>,
|
pub open_issues_count: Option<u64>,
|
||||||
pub open_pr_counter: Option<u64>,
|
pub open_pr_counter: Option<u64>,
|
||||||
#[serde(deserialize_with = "crate::none_if_blank_url")]
|
#[serde(deserialize_with = "crate::none_if_blank_url")]
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"name": "MIT",
|
"name": "MIT",
|
||||||
"url": "http://opensource.org/licenses/MIT"
|
"url": "http://opensource.org/licenses/MIT"
|
||||||
},
|
},
|
||||||
"version": "7.0.0+gitea-1.22.0"
|
"version": "7.0.1+gitea-1.22.0"
|
||||||
},
|
},
|
||||||
"basePath": "/api/v1",
|
"basePath": "/api/v1",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
@ -17396,6 +17396,9 @@
|
||||||
"uniqueItems": true,
|
"uniqueItems": true,
|
||||||
"x-go-name": "Name"
|
"x-go-name": "Name"
|
||||||
},
|
},
|
||||||
|
"object_format_name": {
|
||||||
|
"$ref": "#/definitions/ObjectFormatName"
|
||||||
|
},
|
||||||
"private": {
|
"private": {
|
||||||
"description": "Whether the repository is private",
|
"description": "Whether the repository is private",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
@ -20169,6 +20172,11 @@
|
||||||
},
|
},
|
||||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||||
},
|
},
|
||||||
|
"ObjectFormatName": {
|
||||||
|
"description": "ObjectFormatName of the underlying git repository",
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["sha1", "sha256"]
|
||||||
|
},
|
||||||
"Organization": {
|
"Organization": {
|
||||||
"description": "Organization represents an organization",
|
"description": "Organization represents an organization",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -21268,6 +21276,9 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"x-go-name": "Name"
|
"x-go-name": "Name"
|
||||||
},
|
},
|
||||||
|
"object_format_name": {
|
||||||
|
"$ref": "#/definitions/ObjectFormatName"
|
||||||
|
},
|
||||||
"open_issues_count": {
|
"open_issues_count": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
|
|
|
@ -95,6 +95,7 @@ async fn repo() {
|
||||||
issue_labels: Some("".into()),
|
issue_labels: Some("".into()),
|
||||||
license: Some("".into()),
|
license: Some("".into()),
|
||||||
name: "test".into(),
|
name: "test".into(),
|
||||||
|
object_format_name: None,
|
||||||
private: Some(false),
|
private: Some(false),
|
||||||
readme: None,
|
readme: None,
|
||||||
template: Some(false),
|
template: Some(false),
|
||||||
|
|
Loading…
Reference in a new issue