@@ -11,7 +11,7 @@ read_property() {
1111# Initialize variables with default empty values
1212agent_instance_url=" "
1313agent_instance_secret=" "
14- git_url =" "
14+ pr_url =" "
1515
1616# Check if the first argument is a file
1717if [ -f " $1 " ]; then
@@ -21,7 +21,7 @@ if [ -f "$1" ]; then
2121 # Read initial values from the property file
2222 agent_instance_url=$( read_property " agent_instance_url" " ${PROPERTY_FILE} " )
2323 agent_instance_secret=$( read_property " agent_instance_secret" " ${PROPERTY_FILE} " )
24- git_url =$( read_property " git_url " " ${PROPERTY_FILE} " )
24+ pr_url =$( read_property " pr_url " " ${PROPERTY_FILE} " )
2525fi
2626
2727# Override with command line arguments if provided
3636 agent_instance_secret=" ${arg#* =} "
3737 agent_instance_secret=" ${agent_instance_secret// \" } "
3838 ;;
39- git_url =* )
40- git_url =" ${arg#* =} "
41- git_url =" ${git_url // \" } "
39+ pr_url =* )
40+ pr_url =" ${arg#* =} "
41+ pr_url =" ${pr_url // \" } "
4242 ;;
4343 * )
4444 echo " Unknown argument: $arg "
@@ -57,21 +57,21 @@ if [ -z "$agent_instance_secret" ]; then
5757 exit 1
5858fi
5959
60- if [ -z " $git_url " ]; then
61- echo " Error: git_url is empty"
60+ if [ -z " $pr_url " ]; then
61+ echo " Error: pr_url is empty"
6262 exit 1
6363fi
6464
6565# Print properties
6666echo " Agent Instance URL: $agent_instance_url "
67- echo " Git URL: $git_url "
67+ echo " Git URL: $pr_url "
6868
6969# Execute the curl command
7070eval " curl --location '$agent_instance_url ' \
7171--header 'X-Bito-Action-Token: $agent_instance_secret ' \
7272--header 'Content-Type: application/json' \
7373--data '{
74- \" git_url\" : \" $git_url \" ,
74+ \" git_url\" : \" $pr_url \" ,
7575 \" command\" : \" review\" ,
7676 \" arguments\" : {}
7777}'"
0 commit comments