Fix debug info display - show after clear command

- Moved debug fields (Local HEAD, Created, Commit) into monitoring loop
- Removed duplicate output that was immediately cleared
- Added warning when local commit doesn't match pipeline commit
- Now debug info stays visible throughout monitoring
This commit is contained in:
Graham McIntire 2026-01-15 09:07:23 -06:00
parent 37160fc33f
commit de3c282825
No known key found for this signature in database

View file

@ -194,13 +194,6 @@ monitor_pipeline() {
local branch=$(get_current_branch)
local local_sha=$(git rev-parse HEAD 2>/dev/null | cut -c1-8)
echo -e "${BLUE}Branch:${NC} $branch"
if [ -n "$local_sha" ]; then
echo -e "${BLUE}Local HEAD:${NC} $local_sha"
fi
echo -e "${BLUE}Fetching latest pipeline...${NC}"
echo ""
local pipeline=$(get_latest_pipeline "$branch")
if [ -z "$pipeline" ] || [ "$pipeline" = "null" ]; then
@ -215,13 +208,6 @@ monitor_pipeline() {
local pipeline_sha=$(echo "$pipeline" | jq -r '.sha')
local pipeline_created=$(echo "$pipeline" | jq -r '.created_at')
echo -e "${BLUE}Pipeline:${NC} #$pipeline_id"
echo -e "${BLUE}Created:${NC} $pipeline_created"
echo -e "${BLUE}Commit:${NC} ${pipeline_sha:0:8}"
echo -e "${BLUE}Status:${NC} $(status_icon $pipeline_status) $pipeline_status"
echo -e "${BLUE}URL:${NC} $pipeline_web_url"
echo ""
local start_time=$(date +%s)
# Monitor until complete
@ -229,8 +215,18 @@ monitor_pipeline() {
print_header
echo -e "${BLUE}Branch:${NC} $branch"
echo -e "${BLUE}Local HEAD:${NC} $local_sha"
echo -e "${BLUE}Pipeline:${NC} #$pipeline_id"
echo -e "${BLUE}Created:${NC} $pipeline_created"
echo -e "${BLUE}Commit:${NC} ${pipeline_sha:0:8}"
# Warn if local commit doesn't match pipeline commit
if [ "$local_sha" != "${pipeline_sha:0:8}" ]; then
echo -e "${YELLOW}⚠️ Warning: Pipeline is for a different commit${NC}"
fi
echo -e "${BLUE}Status:${NC} $(status_icon $pipeline_status) $pipeline_status"
echo -e "${BLUE}URL:${NC} $pipeline_web_url"
echo ""
# Get and display jobs