Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .agents/scripts/pulse-session-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@

if is_session_active; then
local started_at
started_at=$(grep '^started_at=' "$SESSION_FLAG" | cut -d= -f2)
started_at=$(grep '^started_at=' "$SESSION_FLAG" | cut -d= -f2 | tr -cd '[:alnum:]T:Z.+-')
print_warning "Pulse session already active (started: ${started_at:-unknown})"
echo ""
echo " To restart: aidevops pulse stop && aidevops pulse start"
Expand Down Expand Up @@ -251,7 +251,7 @@

local started_at=""
if is_session_active; then
started_at=$(grep '^started_at=' "$SESSION_FLAG" | cut -d= -f2)
started_at=$(grep '^started_at=' "$SESSION_FLAG" | cut -d= -f2 | tr -cd '[:alnum:]T:Z.+-')
fi

# Create stop flag — this overrides all consent layers immediately
Expand Down Expand Up @@ -416,7 +416,7 @@
fi
if [[ "$has_session_flag" == "true" ]]; then
local started_at started_by
started_at=$(grep '^started_at=' "$SESSION_FLAG" | cut -d= -f2 | tr -cd '[:alnum:]T:Z.+-')

Check warning on line 419 in .agents/scripts/pulse-session-helper.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of using the literal '[:alnum:]T:Z.+-' 4 times.

See more on https://sonarcloud.io/project/issues?id=marcusquinn_aidevops&issues=AZztU3-O93q8aLTr1dho&open=AZztU3-O93q8aLTr1dho&pullRequest=4876
started_by=$(grep '^started_by=' "$SESSION_FLAG" | cut -d= -f2 | tr -cd '[:alnum:]._-')
echo -e " Session flag: ${GREEN}active${NC} (${started_at:-unknown} by ${started_by:-unknown})"
else
Expand Down
Loading