[Python] Azure devops Python API - how to check if there is already an existing commit or PR...

Discussão em 'Python' iniciado por Stack, Fevereiro 27, 2025.

  1. Stack

    Stack Membro Participativo

    I am building automation for people in our team to upload certain files, then after some conditions are fulfilled they can click on a create PR button to create a pull request. However we often get this:

    Error: AzureDevOpsServiceError at line 54 of /tmp/8dd54eaca7647d4/app.py: Multiple operations were attempted on file 'src/xyz.yml' within the same request. Only a single operation may be applied to each file within the same commit. Parameter name: newPush

    Which means a PR or commit already existed on the file. Is there an ADO API endpoint that can check this for us? Whether a commit or PR exists for the given file?

    Continue reading...

Compartilhe esta Página