The field that stores the source-level version in the commit message
is named "commit", which is different from the terminology used by
git and other development tools.
This commit renames the "commit" field of commit messages to "ref".
Related functions are also renamed accordingly.
foundry_msg_commit_new() {
local repository="$1"
local branch="$2"
- local commit="$3"
+ local ref="$3"
local data
local msg
if ! data=$(json_object "repository" "$repository" \
- "commit" "$commit" \
- "branch" "$branch"); then
+ "branch" "$branch" \
+ "ref" "$ref"); then
return 1
fi
return 0
}
-foundry_msg_commit_get_commit() {
+foundry_msg_commit_get_ref() {
local msg="$1"
- local commit
+ local ref
- if ! commit=$(foundry_msg_get_data_field "$msg" "commit"); then
+ if ! ref=$(foundry_msg_get_data_field "$msg" "ref"); then
return 1
fi
- echo "$commit"
+ echo "$ref"
return 0
}
"type": "string"
},
- "commit": {
- "description": "The hash of the detected commit",
+ "ref": {
+ "description": "Identifier of the source code version",
"type": "string",
"pattern": "^[0-9a-fA-F]+$"
}
"required": [
"repository",
"commit",
- "branch"
+ "ref"
]
}