Skip to content

Commit d054917

Browse files
ernestaskJohnVillalovos
authored andcommitted
feat(releases): Add support for direct_asset_path
This commit adds support for the “new” alias for `filepath`: `direct_asset_path` (added in 15.10) in release links API.
1 parent cd04315 commit d054917

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gitlab/v4/objects/releases.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ class ProjectReleaseLinkManager(CRUDMixin, RESTManager):
5050
_obj_cls = ProjectReleaseLink
5151
_from_parent_attrs = {"project_id": "project_id", "tag_name": "tag_name"}
5252
_create_attrs = RequiredOptional(
53-
required=("name", "url"), optional=("filepath", "link_type")
53+
required=("name", "url"),
54+
optional=("filepath", "direct_asset_path", "link_type"),
55+
)
56+
_update_attrs = RequiredOptional(
57+
optional=("name", "url", "filepath", "direct_asset_path", "link_type")
5458
)
55-
_update_attrs = RequiredOptional(optional=("name", "url", "filepath", "link_type"))
5659

5760
def get(
5861
self, id: Union[str, int], lazy: bool = False, **kwargs: Any

0 commit comments

Comments
 (0)