Explorer

core.check-event-in-state

description
The rules of core.check-event given what they know (core.event-check-state, derived by core.event-check-state-of). See docs/event.md. Sending create_account again changes the account name (the newest one is the name)
type
Fn(content: @core.event-content, state: @core.event-check-state) -> List<@core.event-rejection>
expression
fn(content$0, state$1) =>
  match $0 {
    #create_account(account$2) =>
      match @core.equal(left: @core.string-length(value: $2.account_name), right: 0) {
        true =>
          [#empty_account_name<@core.event-rejection>],
        false =>
          []
      },
    #project_commit(commit$3) =>
      @core.list-concat(
        left: match $1.account_created {
          true =>
            [],
          false =>
            [#account_not_created<@core.event-rejection>]
        },
        right: @core.list-concat(
          left: match @core.equal(left: @core.string-length(value: $3.project_name), right: 0) {
            true =>
              [#empty_project_name<@core.event-rejection>],
            false =>
              []
          },
          right: @core.list-concat(
            left: match @core.equal(left: @core.string-length(value: $3.branch), right: 0) {
              true =>
                [#empty_branch_name<@core.event-rejection>],
              false =>
                []
            },
            right: @core.list-concat(
              left: @core.list-concat(
                left: @core.check-event-branch(commit: $3, state: $1),
                right: @core.check-event-merge(commit: $3, state: $1)
              ),
              right: @core.check-event-module-names(modules: $3.modules, others: $1.modules_in_other_projects, seen: [], index: 0)
            )
          )
        )
      )
  }
visibility
public
core.check-event-in-state (project definy, branch auto-release, snapshot oiQgPqhJm-TbM4kexXeRHBaJB_tS7gwBSewII64P-44)
id: WRKFQ7KMpo0qMBZLLRRc4qqjUa_Eoe5g4vq_mve987k
content hash: Y4OxAh_XV1a46qbPdzCr5eAkddfa-ynQEjYoLd_gVO0