Explorer

core.project-has-commit

description
Whether the project has a commit, from index. With hash (some), whether the commit is one of the project
type
Fn(
  commits: List<@core.commit-summary>,
  project_name: String,
  hash: Union{#none, #some(String)},
  index: Number
) -> Boolean
expression
fn(commits$0, project_name$1, hash$2, index$3) =>
  match @core.list-get(list: $0, index: $3) {
    #none(_) =>
      false,
    #some(item$1006) =>
      let commit$4 = $1006;
      match @core.and(
          left: @core.equal(left: $4.project_name, right: $1),
          right: match $2 {
            #none(_) =>
              true,
            #some(h$5) =>
              @core.equal(left: $4.event_hash, right: $5)
          }
        ) {
        true =>
          true,
        false =>
          @core.project-has-commit(commits: $0, project_name: $1, hash: $2, index: @core.plus(left: $3, right: 1))
      }
  }
visibility
public
core.project-has-commit (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc)
id: nbbR0GZ-NZ2G8oiTpP65KNZElxxY1sXOWl9Ea6eViSU
content hash: 3WUSP1p0cMwAepdzIAAokJJwPzzxvob4c_Lfjd5PAQk