From fa58414d964a30c5086d67c373821a89b5aa9430 Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Thu, 25 Jul 2019 12:38:25 +0000 Subject: [PATCH] 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 --- src/script/ceph-backport.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.47.3