GIT Server integrated with Redmine

Asked

Viewed 69 times

1

I have a built-in git server with Redmine, it’s set right and it’s being used by several people, but when the commit comment has double quotes (") it’s not synchronized. I use a script, below the part related to the commission:

function redmine_update_issue {
    redmine_host=$(git config redmine.host)
    redmine_apikey=$(git config $GL_USER.apikey)
    content="{\"issue\":{\"notes\":\"\nRealizado commit no GIT, detalhes:\n\n-Mensagem de Commit:\n $2\"}}"

    debug "funcao redmine_update_issue - content=$content - redmine_apikey=$redmine_apikey - redmine_host/1=$redmine_host/$1"
    curl --silent -k -H "Contet-Type: application/json" -X PUT --data "$contet" -H "X-Redmine-API-Key: $redmine_apikey" "$redmine_host/$1" }

Does anyone have any idea?

Thanks in advance!

  • $2 probably this including escaped double quotes and content is corrupted (try giving a echo in content output to confirm). The solution is to replace " for \" in $2 in your script.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.