@@ -10,7 +10,9 @@ use symbolic::common::ByteView;
1010use zip:: write:: SimpleFileOptions ;
1111use zip:: { DateTime , ZipWriter } ;
1212
13- use crate :: api:: { Api , AuthenticatedApi , ChunkUploadCapability , ChunkedFileState , VcsInfo } ;
13+ use crate :: api:: {
14+ Api , AuthenticatedApi , ChunkUploadCapability , ChunkedBuildRequest , ChunkedFileState , VcsInfo ,
15+ } ;
1416use crate :: config:: Config ;
1517use crate :: utils:: args:: ArgExt as _;
1618#[ cfg( all( target_os = "macos" , target_arch = "aarch64" ) ) ]
@@ -90,6 +92,11 @@ pub fn make_command(command: Command) -> Command {
9092 . long ( "build-configuration" )
9193 . help ( "The build configuration to use for the upload. If not provided, the current version will be used." )
9294 )
95+ . arg (
96+ Arg :: new ( "release_notes" )
97+ . long ( "release-notes" )
98+ . help ( "The release notes to use for the upload." )
99+ )
93100}
94101
95102pub fn execute ( matches : & ArgMatches ) -> Result < ( ) > {
@@ -169,6 +176,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
169176 let pr_number = matches. get_one :: < u32 > ( "pr_number" ) ;
170177
171178 let build_configuration = matches. get_one ( "build_configuration" ) . map ( String :: as_str) ;
179+ let release_notes = matches. get_one ( "release_notes" ) . map ( String :: as_str) ;
172180
173181 let api = Api :: current ( ) ;
174182 let authenticated_api = api. authenticated ( ) ?;
@@ -238,6 +246,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
238246 & org,
239247 & project,
240248 build_configuration,
249+ release_notes,
241250 & vcs_info,
242251 ) {
243252 Ok ( artifact_url) => {
@@ -397,6 +406,7 @@ fn upload_file(
397406 org : & str ,
398407 project : & str ,
399408 build_configuration : Option < & str > ,
409+ release_notes : Option < & str > ,
400410 vcs_info : & VcsInfo < ' _ > ,
401411) -> Result < String > {
402412 const SELF_HOSTED_ERROR_HINT : & str = "If you are using a self-hosted Sentry server, \
@@ -457,10 +467,20 @@ fn upload_file(
457467 let response = api. assemble_build (
458468 org,
459469 project,
460- checksum,
461- & checksums,
462- build_configuration,
463- vcs_info,
470+ & ChunkedBuildRequest {
471+ checksum,
472+ chunks : & checksums,
473+ build_configuration,
474+ release_notes,
475+ head_sha : vcs_info. head_sha ,
476+ base_sha : vcs_info. base_sha ,
477+ provider : vcs_info. vcs_provider ,
478+ head_repo_name : vcs_info. head_repo_name ,
479+ base_repo_name : vcs_info. base_repo_name ,
480+ head_ref : vcs_info. head_ref ,
481+ base_ref : vcs_info. base_ref ,
482+ pr_number : vcs_info. pr_number ,
483+ } ,
464484 ) ?;
465485 chunks. retain ( |Chunk ( ( digest, _) ) | response. missing_chunks . contains ( digest) ) ;
466486
0 commit comments