anchor.diff:        release="HEAD"
       fi
       echo "$release"
  +  '';
  +
  +  # find the latest repos of a github organization
  +  latestGithubRepos = { orga }: writeShellScript "latest-github-repos" ''
  +    set -euo pipefail
  +    res=$(${curl}/bin/curl \
  +      --silent \
  +      'https://api.github.com/orgs/${orga}/repos?per_page=100')
  +
  +    if [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "rate limit" ]]; then
  +      echo "rate limited" >&2
  +    fi
  +
  +    printf "%s" "$res" | ${jq}/bin/jq 'map(.name)' \
  +      || echo "failed $res"
     '';
   
     # update one tree-sitter grammar repo and print their nix-prefetch-git output
  
positive.code: , src }:
  
  let
    # print all the grammar names mentioned in the fetch-fixtures script
    getGrammarNames = writeShellScript "get-grammars.sh" ''
      set -euo pipefail
      sed -ne 's/^fetch_grammar \(\S*\).*$/\1/p' \
        ${src}/script/fetch-fixtures
    '';
  
    # TODO
  
negative.code:     res=$(${curl}/bin/curl \
        --silent \
        "https://api.github.com/repos/${urlEscape owner}/$(${urlEscapeSh} "$repo")/releases/latest")
      if [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "rate limit" ]]; then
        echo "rate limited" >&2
      fi
      release=$(printf "%s" "$res" | ${jq}/bin/jq '.tag_name')
  