Skip to content

Clean up changelog output for copy-paste into devcenter#151

Open
schneems wants to merge 7 commits into
mainfrom
schneems/fix-changelog-printing
Open

Clean up changelog output for copy-paste into devcenter#151
schneems wants to merge 7 commits into
mainfrom
schneems/fix-changelog-printing

Conversation

@schneems

@schneems schneems commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Cleans up the changelog printing for binary build steps. Details in commits.

@schneems schneems force-pushed the schneems/fix-changelog-printing branch 4 times, most recently from d9271ef to c4a43fe Compare June 18, 2026 21:09
@schneems

Copy link
Copy Markdown
Contributor Author

I triggered two dry runs so you can validate the new output:

schneems added 6 commits June 19, 2026 21:13
The changelog binaries printed an internal "Add a changelog item:
https://devcenter.heroku.com/admin/changelog_items/new" line as the
first line of their output. When a maintainer copies the generated
changelog to paste into the devcenter form, that instructional URL can
get accidentally copied and posted to the public interface.
Build in its own step so compile/download output doesn't pollute the changelog step.
Problem: The output of the changelog entry on the summary is intended to be a copy/pasteable entry, however github summaries use markdown for styling so the contents are rendered instead of raw. To fix it we have to escape the contents by wrapping the changelog in a four-backtick fence.

This is needed because the changelog already uses three backticks in the output:

      ```ruby

Per https://github.github.com/gfm/#fenced-code-blocks

> The content of the code block consists of all subsequent lines, until a closing code fence of the same type as the code block began with (backticks or tildes), and with at least as many backticks or tildes as the opening code fence.
THe ruby one already printed to stdout.
Extract a pure render_jruby_changelog helper so the changelog output
format can be unit tested without a network fetch, and add a
regular_release test mirroring ruby_changelog. Adds pretty_assertions
as a dev-dependency.
@schneems schneems force-pushed the schneems/fix-changelog-printing branch from 5889c63 to 133a6bc Compare June 20, 2026 02:29
```
   Compiling ruby_executable v0.0.0 (/home/runner/work/docker-heroku-ruby-builder/docker-heroku-ruby-builder/ruby_executable)
   Compiling jruby_executable v0.0.0 (/home/runner/work/docker-heroku-ruby-builder/docker-heroku-ruby-builder/jruby_executable)
error[E0308]: mismatched types
  --> jruby_executable/src/bin/jruby_changelog.rs:22:28
   |
22 |     render_jruby_changelog(version, &stdlib_version, io)
   |     ---------------------- ^^^^^^^ expected `&str`, found `&JRubyVersion`
   |     |
   |     arguments to this function are incorrect
   |
   = note: expected reference `&str`
              found reference `&JRubyVersion`
note: function defined here
  --> jruby_executable/src/bin/jruby_changelog.rs:25:4
   |
25 | fn render_jruby_changelog<W>(
   |    ^^^^^^^^^^^^^^^^^^^^^^
26 |     version: &str,
   |     -------------

For more information about this error, try `rustc --explain E0308`.
error: could not compile `jruby_executable` (bin "jruby_changelog") due to 1 previous error
warning: build failed, waiting for other jobs to finish...
```
@schneems schneems marked this pull request as ready for review June 20, 2026 02:52
@schneems schneems requested a review from a team as a code owner June 20, 2026 02:52
@schneems schneems enabled auto-merge (squash) June 20, 2026 02:52
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