Skip to content

Commit adbfc60

Browse files
Use version tags as GitHub release titles
1 parent aeddf68 commit adbfc60

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎lib/bake/gem/github/publisher.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def preserve_release(receipt)
151151
metadata = "#{receipt.fetch(:pull_request_url)}\n\nSource: #{receipt.fetch(:commit)}\nSHA256: #{receipt.fetch(:sha256)}\n"
152152
Tempfile.create("release") do |file|
153153
file.write(JSON.generate(
154-
tag_name: tag, draft: true, target_commitish: receipt.fetch(:commit), name: "#{receipt.fetch(:name)} #{tag}",
154+
tag_name: tag, draft: true, target_commitish: receipt.fetch(:commit), name: tag,
155155
body: [notes, metadata].compact.join("\n")
156156
))
157157
file.flush

‎releases.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Releases
22

3+
## Unreleased
4+
5+
- Use only the version tag for GitHub release titles.
6+
37
## v0.1.0
48

59
- Include the version's release notes in GitHub releases using `bake-releases`.

‎test/bake/gem/github/publisher/recovery.rb‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def restore
7373
it "uses the artifact metadata when release notes are missing" do
7474
receipt = @publisher.publish(42)
7575

76+
expect(@publisher.releases.first.fetch("name")).to be == "v1.0.1"
7677
expect(@publisher.releases.first.fetch("body")).to be == <<~MARKDOWN
7778
https://github.com/socketry/example/pull/42
7879

0 commit comments

Comments
 (0)