This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
/** | |
* This function gets a async function and in case of error, it retries it | |
* | |
* @async | |
* @function retry | |
* @param {function} func - The async function | |
* @param {object} options - Retry options | |
* @param {Array} [options.args] - An array containing `func` arguments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# List of branches that never should be deleted | |
protected_branches=('v1.7' 'develop' 'master') | |
echo "Fetching all from remote to ensure everything is up to date..." | |
git fetch --all | |
expiration_date=$(date --date="7 days ago") |