File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- actions
2- ansible-compat
3- ansible-content-actions
4- ansible-creator
5- ansible-dev-environment
6- ansible-dev-tools
7- ansible-lint
8- ansible-navigator
9- ansible-sign
10- mkdocs-ansible
11- molecule
12- pytest-ansible
13- team-devtools
14- tox-ansible
15- vscode-ansible
1+ ansible-automation-platform/ansible-devtools-container
2+ ansible-automation-platform/ansible-devspaces-container
3+ ansible/actions
4+ ansible/ansible-compat
5+ ansible/ansible-content-actions
6+ ansible/ansible-creator
7+ ansible/ansible-dev-environment
8+ ansible/ansible-dev-tools
9+ ansible/ansible-lint
10+ ansible/ansible-navigator
11+ ansible/ansible-sign
12+ ansible/mkdocs-ansible
13+ ansible/molecule
14+ ansible/pytest-ansible
15+ ansible/team-devtools
16+ ansible/tox-ansible
17+ ansible/vscode-ansible
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22# Configure autolink references for all GitHub repos listed in repos.lst.
3+ # Each line is org/repo (see config/repos.lst). Blank lines and # comments are ignored.
34# Idempotent: skips entries that already match, updates ones with a changed URL.
4- # Usage: ./setup .autolink.sh [org] (default org: ansible)
5+ # Usage: ./gh .autolink.sh
56set -euo pipefail
67
7- ORG=" ${1:- ansible} "
88SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
99REPOS_FILE=" $SCRIPT_DIR /../config/repos.lst"
1010
@@ -15,8 +15,18 @@ DESIRED=(
1515 " ANSTRAT-|https://redhat.atlassian.net/browse/ANSTRAT-<num>"
1616)
1717
18- while IFS= read -r repo || [[ -n " $repo " ]]; do
19- [[ -z " $repo " ]] && continue
18+ while IFS= read -r line || [[ -n " $line " ]]; do
19+ # strip comments and trim whitespace
20+ line=" ${line%%#* } "
21+ line=" ${line# " ${line%% [![:space:]]* } " } "
22+ line=" ${line% " ${line##* [![:space:]]} " } "
23+ [[ -z " $line " ]] && continue
24+ if [[ " $line " != * /* ]]; then
25+ echo " gh.autolink.sh: expected org/repo, got: $line " >&2
26+ exit 1
27+ fi
28+ ORG=" ${line%%/* } "
29+ repo=" ${line#*/ } "
2030
2131 current=$( gh api " repos/$ORG /$repo /autolinks" 2> /dev/null || echo " []" )
2232
You can’t perform that action at this time.
0 commit comments