Explorer

core.value-to-branch-status-change

description
Read a value of the evaluator (core.value) as core.branch-status-change. none if the shape differs
type
Fn(value: @core.value) -> Union{#none, #some(@core.branch-status-change)}
expression
fn(value$0) =>
  match $0 {
    #record(fields$1) =>
      match @core.value-record-field(fields: $1, key: "project_name", index: 0) {
        #some(field$2) =>
          match $2 {
            #string(project_name$3) =>
              match @core.value-record-field(fields: $1, key: "branch", index: 0) {
                #some(field$4) =>
                  match $4 {
                    #string(branch$5) =>
                      match @core.value-record-field(fields: $1, key: "status", index: 0) {
                        #some(field$6) =>
                          match @core.value-to-branch-status(value: $6) {
                            #some(status$7) =>
                              #some({project_name: $3, branch: $5, status: $7}),
                            _ =>
                              #none
                          },
                        _ =>
                          #none
                      },
                    _ =>
                      #none
                  },
                _ =>
                  #none
              },
            _ =>
              #none
          },
        _ =>
          #none
      },
    _ =>
      #none
  }
visibility
public
core.value-to-branch-status-change (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: ltpIwSb-CiXUjY1y2EMG7Eii7yfdyODubZdmnaGEYh0
content hash: _tnDwsbUnkHyC9WqylV7DeLIAs7_CCXTzDTlS8b9sX4