Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 40 additions & 32 deletions .github/workflows/pull-project-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,19 @@ jobs:
while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts: $*"

# Run the command directly, not via eval
if "$@"; then
echo "Command succeeded on attempt $attempt."
# Capture both stdout and stderr, and the exit code
local response
local exit_code
response=$("$@" 2>&1)
exit_code=$?

if [ $exit_code -eq 0 ]; then
echo "Command succeeded on attempt $attempt." >&2
# Output only the response so calling code can capture clean JSON
echo "$response"
return 0
else
local exit_code=$?
echo "Command failed with exit code $exit_code on attempt $attempt."

# Log the response from the command
local response
response=$("$@" 2>&1)
echo "Command response: $response"

if [ $attempt -eq $max_attempts ]; then
Expand Down Expand Up @@ -520,17 +522,19 @@ jobs:
while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts: $*"

# Run the command directly, not via eval
if "$@"; then
echo "Command succeeded on attempt $attempt."
# Capture both stdout and stderr, and the exit code
local response
local exit_code
response=$("$@" 2>&1)
exit_code=$?

if [ $exit_code -eq 0 ]; then
echo "Command succeeded on attempt $attempt." >&2
# Output only the response so calling code can capture clean JSON
echo "$response"
return 0
else
local exit_code=$?
echo "Command failed with exit code $exit_code on attempt $attempt."

# Log the response from the command
local response
response=$("$@" 2>&1)
echo "Command response: $response"

if [ $attempt -eq $max_attempts ]; then
Expand Down Expand Up @@ -731,17 +735,19 @@ jobs:
while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts: $*"

# Run the command directly, not via eval
if "$@"; then
echo "Command succeeded on attempt $attempt."
# Capture both stdout and stderr, and the exit code
local response
local exit_code
response=$("$@" 2>&1)
exit_code=$?

if [ $exit_code -eq 0 ]; then
echo "Command succeeded on attempt $attempt." >&2
# Output only the response so calling code can capture clean JSON
echo "$response"
return 0
else
local exit_code=$?
echo "Command failed with exit code $exit_code on attempt $attempt."

# Log the response from the command
local response
response=$("$@" 2>&1)
echo "Command response: $response"

if [ $attempt -eq $max_attempts ]; then
Expand Down Expand Up @@ -955,17 +961,19 @@ jobs:
while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts: $*"

# Run the command directly, not via eval
if "$@"; then
echo "Command succeeded on attempt $attempt."
# Capture both stdout and stderr, and the exit code
local response
local exit_code
response=$("$@" 2>&1)
exit_code=$?

if [ $exit_code -eq 0 ]; then
echo "Command succeeded on attempt $attempt." >&2
# Output only the response so calling code can capture clean JSON
echo "$response"
return 0
else
local exit_code=$?
echo "Command failed with exit code $exit_code on attempt $attempt."

# Log the response from the command
local response
response=$("$@" 2>&1)
echo "Command response: $response"

if [ $attempt -eq $max_attempts ]; then
Expand Down
Loading