]> git.corax.cc Git - foundry/commitdiff
include/msg: Remove "commit" property from message modules
authorMatthias Kruk <m@m10k.eu>
Sun, 1 Aug 2021 07:35:26 +0000 (16:35 +0900)
committerMatthias Kruk <m@m10k.eu>
Sun, 1 Aug 2021 07:35:26 +0000 (16:35 +0900)
The "commit" property has been removed from all but the message
specification of "commit" messages, so it must be removed from
modules that are used for constructing messages and accessing the
properties of messages.
This commit removes handling of the "commit" property from all
messages that this property has been removed from.

include/msg/build.sh
include/msg/buildrequest.sh
include/msg/test.sh
include/msg/testrequest.sh

index 2d0f30e57d9d41cf6d20b3b8f54bf49d77b10c80..1ca0e2de9405a6934d1c94e05a7a511d50c64f10 100644 (file)
@@ -14,9 +14,8 @@ foundry_msg_build_new() {
        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
@@ -29,7 +28,6 @@ foundry_msg_build_new() {
        if ! json=$(json_object "context"    "$context"       \
                                "repository" "$repository"    \
                                "branch"     "$branch"        \
-                               "commit"     "$commit"        \
                                "result"     "$result"        \
                                "artifacts"  "$artifact_array"); then
                return 1
@@ -82,19 +80,6 @@ foundry_msg_build_get_branch() {
        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"
 
index c392f159a2d004f765926c5085c1ce3d593d5644..d3e8e44e5d03c0bef42638edf471ff12f5c2d452 100644 (file)
@@ -14,15 +14,13 @@ foundry_msg_buildrequest_new() {
        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
 
@@ -72,16 +70,3 @@ foundry_msg_buildrequest_get_branch() {
        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
-}
index 271a1c6fa79f61ef0de0add8b8e15cd47b043caa..c38251195e8fdc73a5798129e68a51d74799e560 100644 (file)
@@ -14,8 +14,7 @@ foundry_msg_test_new() {
        local context="$1"
        local repository="$2"
        local branch="$3"
-       local commit="$4"
-       local result="$5"
+       local result="$4"
 
        local json
        local msg
@@ -23,7 +22,6 @@ foundry_msg_test_new() {
        if ! json=$(json_object "context"    "$context"    \
                                "repository" "$repository" \
                                "branch"     "$branch"     \
-                               "commit"     "$commit"     \
                                "result"     "$result"); then
                return 1
        fi
@@ -75,19 +73,6 @@ foundry_msg_test_get_branch() {
        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"
 
index 356eda9f54e50f08d76e4ed4bb9126a24b91e2ba..fb84c7c06f9c5842e838d32f1ab691c75c5e3f0e 100644 (file)
@@ -14,15 +14,13 @@ foundry_msg_testrequest_new() {
        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
 
@@ -73,16 +71,3 @@ foundry_msg_testrequest_get_branch() {
        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
-}