1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] python call for git api

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

  1. Stack

    Stack Membro Participativo

    I am trying to pass the string to git page through api call from Pipeline run but getting some string formatting error

    gitCheckInputString = '''{"name":"''' + gitCheckName + '''","output":{"title":"''' + gitCheckName + '''","summary":"''' + message + '''","text":"''' + "The summary:\n{ unaudited: " + str($(params.unaudited)) + "\n live: " + str($(params.live)) + "\n real: " + str($(params.real)) + " }" + "\n " + [Click on the link to see results on the Tekton build pipeline](''' + pipelineURL + ''') + '''"}}'''

    print(gitCheckInputString)


    SyntaxError: invalid syntax. Perhaps you forgot a comma?


    The expected output is :

    Click on the link to see results on the Tekton build

    The summary:

    { unaudited: 10

    live: 0

    real: 9
    }

    Continue reading...

Compartilhe esta Página