Skip to content

fix(ci): restore Generate PR Body as separate step#359

Merged
marcusrbrown merged 1 commit intomainfrom
fix/ci-pr-body-step
Mar 22, 2026
Merged

fix(ci): restore Generate PR Body as separate step#359
marcusrbrown merged 1 commit intomainfrom
fix/ci-pr-body-step

Conversation

@marcusrbrown
Copy link
Copy Markdown
Collaborator

Summary

  • Split PR body generation back into its own workflow step with proper variable definitions
  • Fixes TITLE_SUFFIX: unbound variable crash in Release job on main

Root cause

The Generate PR Body step was accidentally merged into the Semantic Release step without its variable definitions (TITLE_SUFFIX, COMMIT_LIST, TIMESTAMP). Bash strict mode (set -u) aborts on unbound variables.

Copy link
Copy Markdown
Owner

@fro-bot fro-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval

This fix correctly addresses the TITLE_SUFFIX: unbound variable crash in the Release job.

Root Cause Analysis

On main, the heredoc inside the "Semantic Release" step references:

  • ${TITLE_SUFFIX}
  • ${COMMIT_LIST}
  • ${TIMESTAMP}

But these are never defined in that shell context. The workflow uses bash -Eeuxo pipefail (line 22), which includes -u (treat unbound variables as errors). This causes the job to crash.

Fix Verification

The PR correctly:

  1. Splits the step - Moves PR body generation to its own step after semantic-release
  2. Defines all variables before use:
    • VERSION from semantic-release outputs
    • COMMIT_LIST from git log
    • TIMESTAMP from date command
  3. Handles conditionals safely - Uses if/else to ensure TITLE_SUFFIX is always defined (not just when VERSION exists)

Minor Observation

The heredoc uses variable interpolation (<<EOF not <<'EOF'), which is correct here since you want the shell to expand ${TITLE_SUFFIX} and ${COMMIT_LIST}. The use of ${COMMIT_LIST:-No new commits} provides a safe default for empty values.


Run Summary
Field Value
Event pull_request
Repository fro-bot/agent
Run ID 23410141471
Cache hit
Session ses_2e9159c45ffeU7GIpSQrSHhEYv

@marcusrbrown marcusrbrown merged commit e81e774 into main Mar 22, 2026
10 of 17 checks passed
@marcusrbrown marcusrbrown deleted the fix/ci-pr-body-step branch March 22, 2026 19:08
@fro-bot fro-bot mentioned this pull request Mar 23, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants