- Notifications
You must be signed in to change notification settings - Fork676
Open
Labels
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 WORKproject.environments.stop_stale("2025-07-08T00:00:00Z")
Actual Behavior
there is no function like that
workaround
fromgitlabimportGitlabgl=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"},)