You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when triggering a pipeline for a merge request: "The resulting pipeline would have been empty" #3075
Description of the problem, including code/CLI snippet
I’m trying to trigger a pipeline for a merge request using the python-gitlab package, but I’m encountering a 400 error with the message: "The resulting pipeline would have been empty." My GitLab CI configuration does not include any rules for the job, so I’m unsure why this error is occurring.
The pipeline should be triggered successfully, and the pre-commit job defined in the .gitlab-ci.yml file should run.
Actual Behavior
The pipeline fails to trigger, and I receive the following error:
Traceback (most recent call last):
File "/Users/neXeacon/Desktop/marge-bot/test.py", line 7, in <module>
response = gl.http_request(
"POST",
f"/projects/{PROJECT_ID}/merge_requests/{MR_ID}/pipelines",
timeout=60,
retry_transient_errors=True,
)
File "/Users/neXeacon/Desktop/marge-bot/venv/lib/python3.13/site-packages/gitlab/client.py", line 773, in http_request
raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 400: {'base': ['The resulting pipeline would have been empty. Review the rules configuration for the relevant jobs.']}
Activity