local context="$1"
local repository="$2"
local branch="$3"
- local commit="$4"
- local result="$5"
- local -n __foundry_msg_build_new_artifacts="$6"
+ local result="$4"
+ local -n __foundry_msg_build_new_artifacts="$5"
local artifact_array
local json
if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
"branch" "$branch" \
- "commit" "$commit" \
"result" "$result" \
"artifacts" "$artifact_array"); then
return 1
return 0
}
-foundry_msg_build_get_commit() {
- local msg="$1"
-
- local commit
-
- if ! commit=$(foundry_msg_get_data_field "$msg" "commit"); then
- return 1
- fi
-
- echo "$commit"
- return 0
-}
-
foundry_msg_build_get_result() {
local msg="$1"
local context="$1"
local repository="$2"
local branch="$3"
- local commit="$4"
local json
local msg
if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
- "branch" "$branch" \
- "commit" "$commit"); then
+ "branch" "$branch"); then
return 1
fi
echo "$branch"
return 0
}
-
-foundry_msg_buildrequest_get_commit() {
- local msg="$1"
-
- local commit
-
- if ! commit=$(foundry_msg_get_data_field "$msg" "commit"); then
- return 1
- fi
-
- echo "$commit"
- return 0
-}
local context="$1"
local repository="$2"
local branch="$3"
- local commit="$4"
- local result="$5"
+ local result="$4"
local json
local msg
if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
"branch" "$branch" \
- "commit" "$commit" \
"result" "$result"); then
return 1
fi
return 0
}
-foundry_msg_test_get_commit() {
- local msg="$1"
-
- local commit
-
- if ! commit=$(foundry_msg_get_data_field "$msg" "commit"); then
- return 1
- fi
-
- echo "$commit"
- return 0
-}
-
foundry_msg_test_get_result() {
local msg="$1"
local context="$1"
local repository="$2"
local branch="$3"
- local commit="$4"
local json
local msg
if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
- "branch" "$branch" \
- "commit" "$commit"); then
+ "branch" "$branch"); then
return 1
fi
echo "$branch"
return 0
}
-
-foundry_msg_testrequest_get_commit() {
- local msg="$1"
-
- local commit
-
- if ! commit=$(foundry_msg_get_data_field "$msg" "commit"); then
- return 1
- fi
-
- echo "$commit"
- return 0
-}