File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -157,15 +157,20 @@ def latest_patchset
157157 require 'zlib'
158158 require 'rubygems/package'
159159
160+ first_message = @topic . messages . order ( :created_at ) . first
161+ first_message_id = first_message &.message_id
162+
160163 tar_gz_data = StringIO . new
161164 Zlib ::GzipWriter . wrap ( tar_gz_data ) do |gz |
162165 Gem ::Package ::TarWriter . new ( gz ) do |tar |
163166 # Add metadata file first
164167 metadata = {
165168 attachment_number : attachment_number ,
166169 topic_id : @topic . id ,
167- submission_date : latest_message . created_at . iso8601
168- } . to_json
170+ submission_date : latest_message . created_at . iso8601 ,
171+ hackorum_url : topic_url ( @topic ) ,
172+ upstream_url : first_message_id ? "https://www.postgresql.org/message-id/flat/#{ ERB ::Util . url_encode ( first_message_id ) } " : nil
173+ } . compact . to_json
169174 tar . add_file_simple ( 'hackorum.json' , 0644 , metadata . bytesize ) do |io |
170175 io . write ( metadata )
171176 end
You can’t perform that action at this time.
0 commit comments