Update archive script

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2021-11-25 19:52:04 +01:00
parent e196a81e99
commit aafdf3d093
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -9,6 +9,7 @@ api_repo="repos/$org/$repo"
exclusions=(
'master'
'main'
)
gh_api_next() {
@ -43,7 +44,7 @@ active_branches() {
git remote add archived "git@github.com:$arch_repo.git" || true
branches_to_move="$(cat <(active_branches) <(pr_branches) <((IFS=$'\n'; echo "${exclusions[*]}")) | sort -u | comm - <(origin_refs | sort) -13)"
branches_to_move="$(cat <(active_branches) <(pr_branches) <((IFS=$'\n'; echo "${exclusions[*]}")) | sort -u | comm - <(origin_refs | sort) -13 | grep -v -e '^release/' -e '^ntwk-')"
echo "================"
printf "%s\n" "$branches_to_move"