Skip to content

feat(ci): use generated title for regen PR#28

Merged
zfarrell merged 1 commit into
mainfrom
ci/llm-regen-pr-titles
Jun 2, 2026
Merged

feat(ci): use generated title for regen PR#28
zfarrell merged 1 commit into
mainfrom
ci/llm-regen-pr-titles

Conversation

@zfarrell

@zfarrell zfarrell commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Accepts title/summary workflow_dispatch inputs from www's notify-sdks so regeneration PRs reflect the actual API changes, falling back to the static title for manual runs.

Comment on lines +71 to +74
title: "${{ inputs.title || 'chore: regenerate client from updated OpenAPI spec' }}"
branch: openapi-update-${{ github.run_id }}
commit-message: "chore: regenerate client from OpenAPI spec"
body: "Auto-generated from updated HotData OpenAPI spec."
commit-message: "${{ inputs.title || 'chore: regenerate client from OpenAPI spec' }}"
body: "${{ inputs.summary || 'Auto-generated from updated HotData OpenAPI spec.' }}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: wrapping ${{ ... }} in "..." does textual substitution into a YAML double-quoted scalar, so any " or \ in inputs.title/inputs.summary will produce invalid YAML and fail the step before the action ever runs. Since summary is intended to hold a PR body (likely multi-line markdown with backticks/quotes generated upstream), this is fragile in practice.

Dropping the outer quotes makes the expression result the entire YAML value directly, which avoids re-parsing the substituted text:

Suggested change
title: "${{ inputs.title || 'chore: regenerate client from updated OpenAPI spec' }}"
branch: openapi-update-${{ github.run_id }}
commit-message: "chore: regenerate client from OpenAPI spec"
body: "Auto-generated from updated HotData OpenAPI spec."
commit-message: "${{ inputs.title || 'chore: regenerate client from OpenAPI spec' }}"
body: "${{ inputs.summary || 'Auto-generated from updated HotData OpenAPI spec.' }}"
title: ${{ inputs.title || 'chore: regenerate client from updated OpenAPI spec' }}
branch: openapi-update-${{ github.run_id }}
commit-message: ${{ inputs.title || 'chore: regenerate client from OpenAPI spec' }}
body: ${{ inputs.summary || 'Auto-generated from updated HotData OpenAPI spec.' }}

(not blocking)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch on the fragility, but dropping the outer quotes breaks raw-YAML parsing here: the fallback string 'chore: regenerate client from updated OpenAPI spec' contains a literal : , so unquoted the value parses as a nested mapping (mapping values are not allowed here). So the quotes need to stay.

Handling the real risk upstream instead: the title is now sanitized at the source in www (notify-sdks.yml / api-docs.yml) with tr -d '\r"\\' | cut -c1-100, stripping quotes/backslashes/newlines and enforcing the length cap before it is ever dispatched here. With the value guaranteed clean, the quoted interpolation is safe. Keeping as-is.

@zfarrell
zfarrell merged commit dce28b6 into main Jun 2, 2026
1 check passed
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.

1 participant