From: Tiago Melo Date: Thu, 25 Jul 2019 12:38:25 +0000 (+0000) Subject: script/ceph-backport.sh: Allow to set component label X-Git-Tag: v15.1.0~2014^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa58414d964a30c5086d67c373821a89b5aa9430;p=ceph.git script/ceph-backport.sh: Allow to set component label ceph-backport.sh will now read the 'component' from a environment variable. Signed-off-by: Tiago Melo --- diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh index 3d01c0c425d8..6acd8bb64891 100755 --- a/src/script/ceph-backport.sh +++ b/src/script/ceph-backport.sh @@ -73,6 +73,11 @@ # git cherry-pick -x ... # ceph-backport.sh 19206 jewel # +# optionally, you can set the component label that will be added to the PR with +# an environment variable: +# +# COMPONENT=dashboard ceph-backport.sh 19206 jewel +# # See http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO_backport_commits # for more info on cherry-picking. # @@ -184,7 +189,7 @@ git push -u $github_repo wip-$issue-$milestone number=$(curl --silent --data-binary '{"title":"'"$title"'","head":"'$github_user':wip-'$issue-$milestone'","base":"'$target_branch'","body":"http://tracker.ceph.com/issues/'$issue'"}' 'https://api.github.com/repos/ceph/ceph/pulls?access_token='$github_token | jq .number) echo "Opened pull request $number" -component=core ; curl --silent --data-binary '{"milestone":'$milestone_number',"assignee":"'$github_user'","labels":["bug fix","'$component'"]}' 'https://api.github.com/repos/ceph/ceph/issues/'$number'?access_token='$github_token +component=${COMPONENT:-core}; curl --silent --data-binary '{"milestone":'$milestone_number',"assignee":"'$github_user'","labels":["bug fix","'$component'"]}' 'https://api.github.com/repos/ceph/ceph/issues/'$number'?access_token='$github_token firefox https://github.com/ceph/ceph/pull/$number redmine_status=2 # In Progress curl --verbose -X PUT --header 'Content-type: application/json' --data-binary '{"issue":{"description":"https://github.com/ceph/ceph/pull/'$number'","status_id":'$redmine_status',"assigned_to_id":'$redmine_user_id'}}' 'http://tracker.ceph.com/issues/'$issue.json?key=$redmine_key