next_github_number.sh 307 B

123456789
  1. #!/usr/bin/env bash
  2. set -e
  3. # Fetch the current GitHub issue number, add one to it -- presto! The likely
  4. # next PR number.
  5. CURRENT_NUMBER=`curl -s "https://api.github.com/repos/matrix-org/synapse/issues?state=all&per_page=1" | jq -r ".[0].number"`
  6. CURRENT_NUMBER=$((CURRENT_NUMBER+1))
  7. echo $CURRENT_NUMBER