script/release-notes/notes.js
async function runRetryable (fn, maxRetries) {
  let lastError
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn()
    } catch (error) {
      await new Promise((resolve, reject) => setTimeout(resolve, CHECK_INTERVAL))
      lastError = error
    }
  }
  // Silently eat 404s.
  if (lastError.status !== 404) throw lastError
}
async function runRetryable (fn, maxRetries) {
  let lastError
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn()
    } catch (error) {
      await new Promise((resolve, reject) => setTimeout(resolve, CHECK_INTERVAL))
      lastError = error
    }
  }
  // Silently eat 404s.
  if (lastError.status !== 404) throw lastError
}
async function runRetryable ( fn , maxRetries ) { let lastError for ( let i = 0 ; i < maxRetries ; i ++ ) { try { return await fn ( ) } catch ( error ) { await new Promise ( ( resolve , reject ) => setTimeout ( resolve , CHECK_INTERVAL ) ) lastError = error } } // Silently eat 404s. if ( lastError . status !== 404 ) throw lastError }
helper function to add some resiliency to volatile GH api endpoints
helper function to add some resiliency to volatile GH api endpoints