-
Notifications
You must be signed in to change notification settings - Fork 674
Open
Description
Description of the problem, including code/CLI snippet
python-gitlab should support stopping stale environments: https://docs.gitlab.com/api/environments/#stop-stale-environments
Expected Behavior
something like
gl = Gitlab.from_config("git.example.com")
project = gl.projects.get("foo/bar")
# THIS DOES NOT WORK
project.environments.stop_stale("2025-07-08T00:00:00Z")
Actual Behavior
there is no function like that
workaround
from gitlab import Gitlab
gl = Gitlab.from_config("git.example.com")
project = gl.projects.get("foo/bar")
gl.http_post(
f"/projects/{project.id}/environments/stop_stale",
post_data={"before": "2025-07-08T00:00:00Z"},
)
Metadata
Metadata
Assignees
Labels
No labels