Skip to content

Commit b9f126f

Browse files
Update bito-actions.sh - change git_url to pr_url
1 parent 933d112 commit b9f126f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

bito-action-script/bito-actions.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ read_property() {
1111
# Initialize variables with default empty values
1212
agent_instance_url=""
1313
agent_instance_secret=""
14-
git_url=""
14+
pr_url=""
1515

1616
# Check if the first argument is a file
1717
if [ -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}")
2525
fi
2626

2727
# Override with command line arguments if provided
@@ -36,9 +36,9 @@ do
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
5858
fi
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
6363
fi
6464

6565
# Print properties
6666
echo "Agent Instance URL: $agent_instance_url"
67-
echo "Git URL: $git_url"
67+
echo "Git URL: $pr_url"
6868

6969
# Execute the curl command
7070
eval "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

Comments
 (0)