Dist messages carry a field for a context identifier. However, since
dist messages do not reference files associated with a context, the
context field is not necessary.
This commit removes the context field from dist type messages.
}
foundry_msg_dist_new() {
- local context="$1"
- local repository="$2"
- local branch="$3"
- local ref="$4"
- local distribution="$5"
- local artifacts=("${@:6}")
+ local repository="$1"
+ local branch="$2"
+ local ref="$3"
+ local distribution="$4"
+ local artifacts=("${@:5}")
local artifacts_json
local json
return 1
fi
- if ! json=$(json_object "context" "$context" \
- "repository" "$repository" \
+ if ! json=$(json_object "repository" "$repository" \
"branch" "$branch" \
"ref" "$ref" \
"distribution" "$distribution" \
return 0
}
-foundry_msg_dist_get_context() {
- local msg="$1"
-
- local context
-
- if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
- return 1
- fi
-
- echo "$context"
- return 0
-}
-
foundry_msg_dist_get_repository() {
local msg="$1"
"type": "object",
"properties": {
- "context": {
- "description": "Context identifier of this transaction",
- "type": "string"
- },
-
"repository": {
"description": "The URL of the repository that the artifacts were built from",
"type": "string",
},
"required": [
- "context",
"repository",
"branch",
"ref",