@@ -11,7 +11,7 @@ read_property() {
11
11
# Initialize variables with default empty values
12
12
agent_instance_url=" "
13
13
agent_instance_secret=" "
14
- git_url =" "
14
+ pr_url =" "
15
15
16
16
# Check if the first argument is a file
17
17
if [ -f " $1 " ]; then
@@ -21,7 +21,7 @@ if [ -f "$1" ]; then
21
21
# Read initial values from the property file
22
22
agent_instance_url=$( read_property " agent_instance_url" " ${PROPERTY_FILE} " )
23
23
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} " )
25
25
fi
26
26
27
27
# Override with command line arguments if provided
36
36
agent_instance_secret=" ${arg#* =} "
37
37
agent_instance_secret=" ${agent_instance_secret// \" } "
38
38
;;
39
- git_url =* )
40
- git_url =" ${arg#* =} "
41
- git_url =" ${git_url // \" } "
39
+ pr_url =* )
40
+ pr_url =" ${arg#* =} "
41
+ pr_url =" ${pr_url // \" } "
42
42
;;
43
43
* )
44
44
echo " Unknown argument: $arg "
@@ -57,21 +57,21 @@ if [ -z "$agent_instance_secret" ]; then
57
57
exit 1
58
58
fi
59
59
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"
62
62
exit 1
63
63
fi
64
64
65
65
# Print properties
66
66
echo " Agent Instance URL: $agent_instance_url "
67
- echo " Git URL: $git_url "
67
+ echo " Git URL: $pr_url "
68
68
69
69
# Execute the curl command
70
70
eval " curl --location '$agent_instance_url ' \
71
71
--header 'X-Bito-Action-Token: $agent_instance_secret ' \
72
72
--header 'Content-Type: application/json' \
73
73
--data '{
74
- \" git_url\" : \" $git_url \" ,
74
+ \" git_url\" : \" $pr_url \" ,
75
75
\" command\" : \" review\" ,
76
76
\" arguments\" : {}
77
77
}'"
0 commit comments