Merge pull request 'fix: BACKLOG_NUMS array in supervisor-poll.sh is never queried (#110)' (#589) from fix/issue-110 into main
This commit is contained in:
commit
a7cd2bbf5b
1 changed files with 2 additions and 3 deletions
|
|
@ -467,12 +467,11 @@ check_project() {
|
||||||
BODY=$(echo "$BACKLOG_FOR_DEPS" | jq -r ".[$i].body // \"\"")
|
BODY=$(echo "$BACKLOG_FOR_DEPS" | jq -r ".[$i].body // \"\"")
|
||||||
ISSUE_DEPS=$(echo "$BODY" | bash "$PARSE_DEPS" | grep -v "^${NUM}$" || true)
|
ISSUE_DEPS=$(echo "$BODY" | bash "$PARSE_DEPS" | grep -v "^${NUM}$" || true)
|
||||||
[ -n "$ISSUE_DEPS" ] && DEPS_OF[$NUM]="$ISSUE_DEPS"
|
[ -n "$ISSUE_DEPS" ] && DEPS_OF[$NUM]="$ISSUE_DEPS"
|
||||||
# shellcheck disable=SC2034
|
|
||||||
BACKLOG_NUMS[$NUM]=1
|
BACKLOG_NUMS[$NUM]=1
|
||||||
done
|
done
|
||||||
|
|
||||||
declare -A NODE_COLOR
|
declare -A NODE_COLOR
|
||||||
for node in "${!DEPS_OF[@]}"; do NODE_COLOR[$node]=0; done
|
for node in "${!BACKLOG_NUMS[@]}"; do NODE_COLOR[$node]=0; done
|
||||||
|
|
||||||
FOUND_CYCLES=""
|
FOUND_CYCLES=""
|
||||||
declare -A SEEN_CYCLES
|
declare -A SEEN_CYCLES
|
||||||
|
|
@ -481,7 +480,7 @@ check_project() {
|
||||||
local node="$1" path="$2"
|
local node="$1" path="$2"
|
||||||
NODE_COLOR[$node]=1
|
NODE_COLOR[$node]=1
|
||||||
for dep in ${DEPS_OF[$node]:-}; do
|
for dep in ${DEPS_OF[$node]:-}; do
|
||||||
[ -z "${NODE_COLOR[$dep]+x}" ] && continue
|
[ -z "${BACKLOG_NUMS[$dep]+x}" ] && continue
|
||||||
if [ "${NODE_COLOR[$dep]}" = "1" ]; then
|
if [ "${NODE_COLOR[$dep]}" = "1" ]; then
|
||||||
local cycle_key
|
local cycle_key
|
||||||
cycle_key=$(echo "$path $dep" | tr ' ' '\n' | sort -n | tr '\n' ' ')
|
cycle_key=$(echo "$path $dep" | tr ' ' '\n' | sort -n | tr '\n' ' ')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue