format
This commit is contained in:
		
							parent
							
								
									dccd4c51ba
								
							
						
					
					
						commit
						ce08cb4d7f
					
				
					 2 changed files with 14 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -213,7 +213,10 @@ impl Forgejo {
 | 
			
		|||
        repo: &str,
 | 
			
		||||
        target: &str,
 | 
			
		||||
    ) -> Result<Option<bytes::Bytes>, ForgejoError> {
 | 
			
		||||
        let request = self.client.get(format!("repos/{owner}/{repo}/archive/{target}.zip")).build()?;
 | 
			
		||||
        let request = self
 | 
			
		||||
            .client
 | 
			
		||||
            .get(format!("repos/{owner}/{repo}/archive/{target}.zip"))
 | 
			
		||||
            .build()?;
 | 
			
		||||
        self.execute_opt_raw(request).await
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -223,7 +226,10 @@ impl Forgejo {
 | 
			
		|||
        repo: &str,
 | 
			
		||||
        target: &str,
 | 
			
		||||
    ) -> Result<Option<bytes::Bytes>, ForgejoError> {
 | 
			
		||||
        let request = self.client.get(format!("repos/{owner}/{repo}/archive/{target}.tar.gz")).build()?;
 | 
			
		||||
        let request = self
 | 
			
		||||
            .client
 | 
			
		||||
            .get(format!("repos/{owner}/{repo}/archive/{target}.tar.gz"))
 | 
			
		||||
            .build()?;
 | 
			
		||||
        self.execute_opt_raw(request).await
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -244,11 +244,15 @@ async fn repo(api: &forgejo_api::Forgejo) -> eyre::Result<()> {
 | 
			
		|||
        "couldn't download attachment"
 | 
			
		||||
    );
 | 
			
		||||
    ensure!(
 | 
			
		||||
        api.download_zip_archive("TestingAdmin", "test", "v1.0").await?.is_some(),
 | 
			
		||||
        api.download_zip_archive("TestingAdmin", "test", "v1.0")
 | 
			
		||||
            .await?
 | 
			
		||||
            .is_some(),
 | 
			
		||||
        "couldn't download zip archive"
 | 
			
		||||
    );
 | 
			
		||||
    ensure!(
 | 
			
		||||
        api.download_tarball_archive("TestingAdmin", "test", "v1.0").await?.is_some(),
 | 
			
		||||
        api.download_tarball_archive("TestingAdmin", "test", "v1.0")
 | 
			
		||||
            .await?
 | 
			
		||||
            .is_some(),
 | 
			
		||||
        "couldn't download tape archive"
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue