}
foundry_msg_build_new() {
- local tid="$1"
+ local context="$1"
local repository="$2"
local branch="$3"
local commit="$4"
return 1
fi
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
"branch" "$branch" \
"commit" "$commit" \
return 0
}
-foundry_msg_build_get_tid() {
+foundry_msg_build_get_context() {
local msg="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$msg" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_buildrequest_new() {
- local tid="$1"
+ local context="$1"
local repository="$2"
local branch="$3"
local commit="$4"
local json
local msg
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
"branch" "$branch" \
"commit" "$commit"); then
return 0
}
-foundry_msg_buildrequest_get_tid() {
+foundry_msg_buildrequest_get_context() {
local msg="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$msg" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_dist_new() {
- local tid="$1"
+ local context="$1"
local repository="$2"
local artifacts=("${@:3}")
return 1
fi
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
"artifacts" "$artifacts_json"); then
return 1
return 0
}
-foundry_msg_dist_get_tid() {
+foundry_msg_dist_get_context() {
local msg="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$msg" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_distrequest_new() {
- local tid="$1"
+ local context="$1"
local artifacts=("${@:2}")
local artifacts_json
return 1
fi
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"artifacts" "$artifacts_json"); then
return 1
fi
return 0
}
-foundry_msg_distrequest_get_tid() {
+foundry_msg_distrequest_get_context() {
local distrequest="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$distrequest" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$distrequest" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_merge_new() {
- local tid="$1"
+ local context="$1"
local repository="$2"
local srcbranch="$3"
local dstbranch="$4"
local json
local msg
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
"srcbranch" "$srcbranch" \
"dstbranch" "$dstbranch" \
return 0
}
-foundry_msg_merge_get_tid() {
+foundry_msg_merge_get_context() {
local msg="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$msg" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_mergerequest_new() {
- local tid="$1"
+ local context="$1"
local repository="$2"
local srcbranch="$3"
local dstbranch="$4"
local json
local msg
- if ! json=$(json_object "tid" "$tid" \
- "repository" "$repository" \
- "source_branch" "$srcbranch" \
+ if ! json=$(json_object "context" "$context" \
+ "repository" "$repository" \
+ "source_branch" "$srcbranch" \
"destination_branch" "$dstbranch"); then
return 1
fi
return 0
}
-foundry_msg_mergerequest_get_tid() {
+foundry_msg_mergerequest_get_context() {
local msg="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$msg" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_sign_new() {
- local tid="$1"
+ local context="$1"
local key="$2"
local artifacts=("${@:3}")
return 1
fi
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"key" "$key" \
"artifacts" "$artifacts_json"); then
return 1
return 0
}
-foundry_msg_sign_get_tid() {
+foundry_msg_sign_get_context() {
local msg="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$msg" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_signrequest_new() {
- local tid="$1"
+ local context="$1"
local artifacts=("${@:2}")
local artifacts_json
return 1
fi
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"artifacts" "$artifacts_json"); then
return 1
fi
return 0
}
-foundry_msg_signrequest_get_tid() {
+foundry_msg_signrequest_get_context() {
local signrequest="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$signrequest" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$signrequest" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_test_new() {
- local tid="$1"
+ local context="$1"
local repository="$2"
local branch="$3"
local commit="$4"
return 1
fi
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
"branch" "$branch" \
"commit" "$commit" \
return 0
}
-foundry_msg_test_get_tid() {
+foundry_msg_test_get_context() {
local msg="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$msg" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}
}
foundry_msg_testrequest_new() {
- local tid="$1"
+ local context="$1"
local repository="$2"
local branch="$3"
local commit="$4"
local json
local msg
- if ! json=$(json_object "tid" "$tid" \
+ if ! json=$(json_object "context" "$context" \
"repository" "$repository" \
- "branch" "$branch" \
- "commit" "$commit"); then
+ "branch" "$branch" \
+ "commit" "$commit"); then
return 1
fi
return 0
}
-foundry_msg_testrequest_get_tid() {
+foundry_msg_testrequest_get_context() {
local msg="$1"
- local tid
+ local context
- if ! tid=$(foundry_msg_get_data_field "$msg" "tid"); then
+ if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
return 1
fi
- echo "$tid"
+ echo "$context"
return 0
}