Skip to content

Commit 370f899

Browse files
Bump the bitbucket schema to match schema store
1 parent 6a0143a commit 370f899

2 files changed

Lines changed: 28 additions & 36 deletions

File tree

src/usethis/_integrations/ci/bitbucket/schema.py

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: schema.json
3-
# timestamp: 2025-01-13T20:41:41+00:00
3+
# timestamp: 2025-03-26T14:07:35+00:00
44
# using the command:
55
# datamodel-codegen --input tests\usethis\_integrations\ci\bitbucket\schema.json --input-file-type jsonschema --output src\usethis\_integrations\ci\bitbucket\schema.py --enum-field-as-literal all --field-constraints --use-double-quotes --use-union-operator --use-standard-collections --use-default-kwarg --output-model-type pydantic_v2.BaseModel --target-python-version 3.10
66
# ruff: noqa: ERA001
@@ -31,19 +31,6 @@ class Depth(RootModel[int]):
3131
)
3232

3333

34-
class SparseCheckout(BaseModel):
35-
cone_mode: bool | None = Field(
36-
default=True,
37-
alias="cone-mode",
38-
description="Controls whether to use cone-mode or non-cone-mode.",
39-
)
40-
enabled: bool | None = Field(default=True, description="Enables sparse checkout.")
41-
patterns: list[str] | None = Field(
42-
default=None,
43-
description="List of patterns to include in sparse checkout. The patterns should be directories or gitignore-style patterns based on the cone-mode settings.",
44-
)
45-
46-
4734
class Clone(BaseModel):
4835
depth: Depth | Literal["full"] | None = Field(
4936
default=50,
@@ -54,10 +41,6 @@ class Clone(BaseModel):
5441
enabled: bool | None = Field(
5542
default=True, description="Enables cloning of the repository."
5643
)
57-
filter: str | None = Field(
58-
default=None,
59-
description='The partial clone filter argument of Git fetch operation. It can be either "blob:none" or "tree:<n>" value',
60-
)
6144
lfs: bool | None = Field(
6245
default=False,
6346
description="Enables the download of files from LFS storage when cloning.",
@@ -67,19 +50,6 @@ class Clone(BaseModel):
6750
alias="skip-ssl-verify",
6851
description="Disables SSL verification during Git clone operation, allowing the use of self-signed certificates.",
6952
)
70-
sparse_checkout: SparseCheckout | None = Field(
71-
default=None,
72-
alias="sparse-checkout",
73-
description="When this is provided, the repository will be cloned using sparse checkout using the provided settings.",
74-
title="Sparse Checkout Settings",
75-
)
76-
strategy: Literal["clone", "fetch"] | None = Field(
77-
default="fetch",
78-
description='Set the Git clone strategy to use. "fetch" is the new default strategy, "clone" is the legacy strategy.',
79-
)
80-
tags: bool | None = Field(
81-
default=False, description="Enables fetching tags when cloning."
82-
)
8353

8454

8555
class MaxTime(RootModel[int]):
@@ -241,6 +211,14 @@ class FailFast(RootModel[bool]):
241211
root: bool = Field(..., title="Fail Fast")
242212

243213

214+
class Download(RootModel[list[str]]):
215+
root: list[str] = Field(
216+
...,
217+
description="Define the list of filtered artifacts to be downloaded by the step.",
218+
min_length=1,
219+
)
220+
221+
244222
class ArtifactsPaths(RootModel[list[str]]):
245223
root: list[str] = Field(..., min_length=1)
246224

@@ -262,6 +240,22 @@ class RunsOnItem(RootModel[str]):
262240
)
263241

264242

243+
class ArtifactsUpload(BaseModel):
244+
depth: int | None = Field(
245+
default=None,
246+
description="The depth to search for the artifact files.",
247+
ge=1,
248+
title="Artifact Depth",
249+
)
250+
name: str = Field(
251+
..., description="The name of the artifact.", title="Artifact Name"
252+
)
253+
paths: ArtifactsPaths
254+
type: Literal["shared"] | None = Field(
255+
default="shared", description="The type of the artifact.", title="Artifact Type"
256+
)
257+
258+
265259
class Runtime(BaseModel):
266260
cloud: Cloud | None = None
267261

@@ -299,11 +293,9 @@ class Script(RootModel[list[str | Pipe | ScriptItemAnchor]]):
299293

300294

301295
class ArtifactsExpanded(BaseModel):
302-
download: bool | None = Field(
303-
default=True,
304-
description="Enables downloading of all available artifacts at the start of a step.",
305-
)
296+
download: bool | Download | None = None
306297
paths: ArtifactsPaths | None = None
298+
upload: list[ArtifactsUpload] | None = Field(default=None, min_length=1)
307299

308300

309301
class RunsOnExpanded(RootModel[list[RunsOnItem]]):

0 commit comments

Comments
 (0)