Skip to content

Commit

Permalink
rename the file sha to file hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Alireza Eiji committed Aug 6, 2024
1 parent e22cc4f commit 5aa75bc
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ public async Task GetFile_ShouldGetFileWithOkStatusCode_WhenInputsAreProvidedPro
Content = null,

Check warning on line 58 in Mohaymen.GiteaClient.IntegrationTests/Gitea/File/GetFilesMetadata/GetFilesMetadataTests.cs

View workflow job for this annotation

GitHub Actions / build-test-deploy

Cannot convert null literal to non-nullable reference type.

Check warning on line 58 in Mohaymen.GiteaClient.IntegrationTests/Gitea/File/GetFilesMetadata/GetFilesMetadataTests.cs

View workflow job for this annotation

GitHub Actions / build-test-deploy

Cannot convert null literal to non-nullable reference type.

Check warning on line 58 in Mohaymen.GiteaClient.IntegrationTests/Gitea/File/GetFilesMetadata/GetFilesMetadataTests.cs

View workflow job for this annotation

GitHub Actions / build-test-deploy

Cannot convert null literal to non-nullable reference type.

Check warning on line 58 in Mohaymen.GiteaClient.IntegrationTests/Gitea/File/GetFilesMetadata/GetFilesMetadataTests.cs

View workflow job for this annotation

GitHub Actions / build-test-deploy

Cannot convert null literal to non-nullable reference type.
FileName = "README.md",
FilePath = "README.md",
FileSha = readmeFileMetadata.FileSha
FileHash = readmeFileMetadata.FileHash
},
new()
{
Content = null,

Check warning on line 65 in Mohaymen.GiteaClient.IntegrationTests/Gitea/File/GetFilesMetadata/GetFilesMetadataTests.cs

View workflow job for this annotation

GitHub Actions / build-test-deploy

Cannot convert null literal to non-nullable reference type.

Check warning on line 65 in Mohaymen.GiteaClient.IntegrationTests/Gitea/File/GetFilesMetadata/GetFilesMetadataTests.cs

View workflow job for this annotation

GitHub Actions / build-test-deploy

Cannot convert null literal to non-nullable reference type.

Check warning on line 65 in Mohaymen.GiteaClient.IntegrationTests/Gitea/File/GetFilesMetadata/GetFilesMetadataTests.cs

View workflow job for this annotation

GitHub Actions / build-test-deploy

Cannot convert null literal to non-nullable reference type.

Check warning on line 65 in Mohaymen.GiteaClient.IntegrationTests/Gitea/File/GetFilesMetadata/GetFilesMetadataTests.cs

View workflow job for this annotation

GitHub Actions / build-test-deploy

Cannot convert null literal to non-nullable reference type.
FileName = filePath,
FilePath = filePath,
FileSha = newFileMetadata.Content!.Content.FileSha
FileHash = newFileMetadata.Content!.Content.FileHash
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public async Task Handle_ShouldCallCreateCommitAsync_WhenInputIsValid()
Path = path,
Content = content,
CommitAction = CommitAction.Create,
FileSha = fileSha
FileHash = fileSha
};

// Act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal record FileCommitRequest
public required string Content { get; set; }

[JsonProperty("sha")]
public string? FileSha { get; init; }
public string? FileHash { get; init; }

[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("operation")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ public class FileCommitDto
{
public required string Path { get; init; }
public required string Content { get; init; }
public string? FileSha { get; init; }
public string? FileHash { get; init; }
public required CommitActionDto CommitActionDto { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class FileResponseDto
public required string Path { get; init; }

[JsonProperty("sha")]
public required string FileSha { get; init; }
public required string FileHash { get; init; }

[JsonProperty("download_url")]
public required string FileDownloadUrl { get; init; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public class Content
public required string StringContent { get; init; }

[JsonProperty("sha")]
public required string FileSha { get; init; }
public required string FileHash { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public class GetFileResponseDto
public required string FilePath { get; init; }

[JsonProperty("sha")]
public required string FileSha { get; init; }
public required string FileHash { get; init; }
}

0 comments on commit 5aa75bc

Please sign in to comment.