From b49796d948783dfe14079290054a2ca3b22a552c Mon Sep 17 00:00:00 2001 From: Matthew Parker Date: Sat, 19 Oct 2024 23:16:44 +0100 Subject: [PATCH 1/5] Implemented list team memberships --- .../Clients/ITeamsClient.cs | 8 +++++++- .../Clients/TeamsClient.cs | 17 +++++++++++++++-- src/PinguApps.Appwrite.Playground/App.cs | 17 ++++++++--------- .../Clients/ITeamsClient.cs | 8 +++++++- .../Clients/TeamsClient.cs | 17 +++++++++++++++-- 5 files changed, 52 insertions(+), 15 deletions(-) diff --git a/src/PinguApps.Appwrite.Client/Clients/ITeamsClient.cs b/src/PinguApps.Appwrite.Client/Clients/ITeamsClient.cs index 22e9e5c..37366a2 100644 --- a/src/PinguApps.Appwrite.Client/Clients/ITeamsClient.cs +++ b/src/PinguApps.Appwrite.Client/Clients/ITeamsClient.cs @@ -52,7 +52,13 @@ public interface ITeamsClient /// The request content /// The team Task> UpdateName(UpdateNameRequest request); - [Obsolete("This method hasn't yet been implemented!")] + + /// + /// Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. + /// Appwrite Docs + /// + /// The request content + /// The memberships list Task> ListTeamMemberships(ListTeamMembershipsRequest request); [Obsolete("This method hasn't yet been implemented!")] Task> CreateTeamMembership(CreateTeamMembershipRequest request); diff --git a/src/PinguApps.Appwrite.Client/Clients/TeamsClient.cs b/src/PinguApps.Appwrite.Client/Clients/TeamsClient.cs index 5329d45..039ae76 100644 --- a/src/PinguApps.Appwrite.Client/Clients/TeamsClient.cs +++ b/src/PinguApps.Appwrite.Client/Clients/TeamsClient.cs @@ -108,9 +108,22 @@ public async Task> UpdateName(UpdateNameRequest request) } } - [ExcludeFromCodeCoverage] /// - public Task> ListTeamMemberships(ListTeamMembershipsRequest request) => throw new NotImplementedException(); + public async Task> ListTeamMemberships(ListTeamMembershipsRequest request) + { + try + { + request.Validate(true); + + var result = await _teamsApi.ListTeamMemberships(GetCurrentSessionOrThrow(), request.TeamId, RequestUtils.GetQueryStrings(request.Queries), request.Search); + + return result.GetApiResponse(); + } + catch (Exception e) + { + return e.GetExceptionResponse(); + } + } [ExcludeFromCodeCoverage] /// diff --git a/src/PinguApps.Appwrite.Playground/App.cs b/src/PinguApps.Appwrite.Playground/App.cs index a47ef75..94e0231 100644 --- a/src/PinguApps.Appwrite.Playground/App.cs +++ b/src/PinguApps.Appwrite.Playground/App.cs @@ -19,22 +19,21 @@ public async Task Run(string[] args) { _client.SetSession(_session); - var request = new UpdateNameRequest() + var request = new ListTeamMembershipsRequest() { - TeamId = "67142b78001c379958cb", - Name = "a good team name" + TeamId = "67142b78001c379958cb" }; - //var clientResponse = await _client.Teams.UpdateName(request); + var clientResponse = await _client.Teams.ListTeamMemberships(request); - //Console.WriteLine(clientResponse.Result.Match( - // result => result.ToString(), - // appwriteError => appwriteError.Message, - // internalError => internalError.Message)); + Console.WriteLine(clientResponse.Result.Match( + result => result.ToString(), + appwriteError => appwriteError.Message, + internalError => internalError.Message)); Console.WriteLine("############################################################################"); - var serverResponse = await _server.Teams.UpdateName(request); + var serverResponse = await _server.Teams.ListTeamMemberships(request); Console.WriteLine(serverResponse.Result.Match( result => result.ToString(), diff --git a/src/PinguApps.Appwrite.Server/Clients/ITeamsClient.cs b/src/PinguApps.Appwrite.Server/Clients/ITeamsClient.cs index 86df891..5f869d8 100644 --- a/src/PinguApps.Appwrite.Server/Clients/ITeamsClient.cs +++ b/src/PinguApps.Appwrite.Server/Clients/ITeamsClient.cs @@ -52,7 +52,13 @@ public interface ITeamsClient /// The request content /// The team Task> UpdateName(UpdateNameRequest request); - [Obsolete("This method hasn't yet been implemented!")] + + /// + /// Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. + /// Appwrite Docs + /// + /// The request content + /// The memberships list Task> ListTeamMemberships(ListTeamMembershipsRequest request); [Obsolete("This method hasn't yet been implemented!")] Task> CreateTeamMembership(CreateTeamMembershipRequest request); diff --git a/src/PinguApps.Appwrite.Server/Clients/TeamsClient.cs b/src/PinguApps.Appwrite.Server/Clients/TeamsClient.cs index d493341..4ba984d 100644 --- a/src/PinguApps.Appwrite.Server/Clients/TeamsClient.cs +++ b/src/PinguApps.Appwrite.Server/Clients/TeamsClient.cs @@ -108,9 +108,22 @@ public async Task> UpdateName(UpdateNameRequest request) } } - [ExcludeFromCodeCoverage] /// - public Task> ListTeamMemberships(ListTeamMembershipsRequest request) => throw new NotImplementedException(); + public async Task> ListTeamMemberships(ListTeamMembershipsRequest request) + { + try + { + request.Validate(true); + + var result = await _teamsApi.ListTeamMemberships(request.TeamId, RequestUtils.GetQueryStrings(request.Queries), request.Search); + + return result.GetApiResponse(); + } + catch (Exception e) + { + return e.GetExceptionResponse(); + } + } [ExcludeFromCodeCoverage] /// From 32ff62097d84ff67c546ddbda907550c668f0621 Mon Sep 17 00:00:00 2001 From: Matthew Parker Date: Sat, 19 Oct 2024 23:34:50 +0100 Subject: [PATCH 2/5] added client tests for list team memberships as well as adding test for list teams --- .../Responses/MembershipsList.cs | 2 +- .../TeamsClientTests.ListTeamMemberships.cs | 130 ++++++++++++++++++ .../Teams/TeamsClientTests.ListTeams.cs | 33 +++++ 3 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs diff --git a/src/PinguApps.Appwrite.Shared/Responses/MembershipsList.cs b/src/PinguApps.Appwrite.Shared/Responses/MembershipsList.cs index 447387c..04b5cc6 100644 --- a/src/PinguApps.Appwrite.Shared/Responses/MembershipsList.cs +++ b/src/PinguApps.Appwrite.Shared/Responses/MembershipsList.cs @@ -10,5 +10,5 @@ namespace PinguApps.Appwrite.Shared.Responses; /// List of memberships. Can be one of: public record MembershipsList( [property: JsonPropertyName("total")] int Total, - [property: JsonPropertyName("memberships")] List Memberships + [property: JsonPropertyName("memberships")] IReadOnlyList Memberships ); diff --git a/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs b/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs new file mode 100644 index 0000000..b0e3f23 --- /dev/null +++ b/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs @@ -0,0 +1,130 @@ +using System.Net; +using PinguApps.Appwrite.Client.Clients; +using PinguApps.Appwrite.Shared.Requests.Teams; +using PinguApps.Appwrite.Shared.Tests; +using PinguApps.Appwrite.Shared.Utils; +using RichardSzalay.MockHttp; + +namespace PinguApps.Appwrite.Client.Tests.Clients.Teams; +public partial class TeamsClientTests +{ + [Fact] + public async Task ListTeamMemberships_ShouldReturnSuccess_WhenApiCallSucceeds() + { + // Arrange + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId() + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams/{request.TeamId}/memberships") + .ExpectedHeaders(true) + .Respond(TestConstants.AppJson, TestConstants.MembershipsListResponse); + + _appwriteClient.SetSession(TestConstants.Session); + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.True(result.Success); + } + + [Fact] + public async Task ListTeamMemberships_ShouldProvideQueryParamss_WhenQueriesAndSearchProvided() + { + // Arrange + var query = Query.Limit(5); + var search = "SearchString"; + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId(), + Queries = [query], + Search = search + }; + + var expectedQueryParams = new Dictionary + { + { "queries[]", query.GetQueryString() }, + { "search", search } + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams/{request.TeamId}/memberships") + .ExpectedHeaders(true) + .WithQueryString($"queries[]={query.GetQueryString()}&search={search}") + .Respond(TestConstants.AppJson, TestConstants.LogsListResponse); + + _appwriteClient.SetSession(TestConstants.Session); + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.True(result.Success); + } + + [Fact] + public async Task ListTeamMemberships_ShouldReturnError_WhenSessionIsNull() + { + // Arrange + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId() + }; + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.True(result.IsError); + Assert.True(result.IsInternalError); + Assert.Equal(ISessionAware.SessionExceptionMessage, result.Result.AsT2.Message); + } + + [Fact] + public async Task ListTeamMemberships_ShouldHandleException_WhenApiCallFails() + { + // Arrange + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId() + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams/{request.TeamId}/memberships") + .ExpectedHeaders(true) + .Respond(HttpStatusCode.BadRequest, TestConstants.AppJson, TestConstants.AppwriteError); + + _appwriteClient.SetSession(TestConstants.Session); + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.True(result.IsError); + Assert.True(result.IsAppwriteError); + } + + [Fact] + public async Task ListTeamMemberships_ShouldReturnErrorResponse_WhenExceptionOccurs() + { + // Arrange + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId() + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams/{request.TeamId}/memberships") + .ExpectedHeaders(true) + .Throw(new HttpRequestException("An error occurred")); + + _appwriteClient.SetSession(TestConstants.Session); + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.False(result.Success); + Assert.True(result.IsInternalError); + Assert.Equal("An error occurred", result.Result.AsT2.Message); + } +} diff --git a/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeams.cs b/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeams.cs index e7c14de..7af2fdb 100644 --- a/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeams.cs +++ b/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeams.cs @@ -2,6 +2,7 @@ using PinguApps.Appwrite.Client.Clients; using PinguApps.Appwrite.Shared.Requests.Teams; using PinguApps.Appwrite.Shared.Tests; +using PinguApps.Appwrite.Shared.Utils; using RichardSzalay.MockHttp; namespace PinguApps.Appwrite.Client.Tests.Clients.Teams; @@ -26,6 +27,38 @@ public async Task ListTeams_ShouldReturnSuccess_WhenApiCallSucceeds() Assert.True(result.Success); } + [Fact] + public async Task ListTeams_ShouldProvideQueryParamss_WhenQueriesAndSearchProvided() + { + // Arrange + var query = Query.Limit(5); + var search = "SearchString"; + var request = new ListTeamsRequest + { + Queries = [query], + Search = search + }; + + var expectedQueryParams = new Dictionary + { + { "queries[]", query.GetQueryString() }, + { "search", search } + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams") + .ExpectedHeaders(true) + .WithQueryString($"queries[]={query.GetQueryString()}&search={search}") + .Respond(TestConstants.AppJson, TestConstants.TeamsListResponse); + + _appwriteClient.SetSession(TestConstants.Session); + + // Act + var result = await _appwriteClient.Teams.ListTeams(request); + + // Assert + Assert.True(result.Success); + } + [Fact] public async Task ListTeams_ShouldReturnError_WhenSessionIsNull() { From 4f180cd7e431fdc6a781f50fc89c74f6b701221e Mon Sep 17 00:00:00 2001 From: Matthew Parker Date: Sat, 19 Oct 2024 23:38:59 +0100 Subject: [PATCH 3/5] added server test for list team membership plus query params test for list teams --- .../TeamsClientTests.ListTeamMemberships.cs | 2 +- .../TeamsClientTests.ListTeamMemberships.cs | 103 ++++++++++++++++++ .../Teams/TeamsClientTests.ListTeams.cs | 31 ++++++ 3 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 tests/PinguApps.Appwrite.Server.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs diff --git a/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs b/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs index b0e3f23..3599d5e 100644 --- a/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs +++ b/tests/PinguApps.Appwrite.Client.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs @@ -31,7 +31,7 @@ public async Task ListTeamMemberships_ShouldReturnSuccess_WhenApiCallSucceeds() } [Fact] - public async Task ListTeamMemberships_ShouldProvideQueryParamss_WhenQueriesAndSearchProvided() + public async Task ListTeamMemberships_ShouldProvideQueryParams_WhenQueriesAndSearchProvided() { // Arrange var query = Query.Limit(5); diff --git a/tests/PinguApps.Appwrite.Server.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs b/tests/PinguApps.Appwrite.Server.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs new file mode 100644 index 0000000..f7667e9 --- /dev/null +++ b/tests/PinguApps.Appwrite.Server.Tests/Clients/Teams/TeamsClientTests.ListTeamMemberships.cs @@ -0,0 +1,103 @@ +using System.Net; +using PinguApps.Appwrite.Shared.Requests.Teams; +using PinguApps.Appwrite.Shared.Tests; +using PinguApps.Appwrite.Shared.Utils; +using RichardSzalay.MockHttp; + +namespace PinguApps.Appwrite.Server.Tests.Clients.Teams; +public partial class TeamsClientTests +{ + [Fact] + public async Task ListTeamMemberships_ShouldReturnSuccess_WhenApiCallSucceeds() + { + // Arrange + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId() + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams/{request.TeamId}/memberships") + .ExpectedHeaders() + .Respond(TestConstants.AppJson, TestConstants.MembershipsListResponse); + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.True(result.Success); + } + + [Fact] + public async Task ListTeamMemberships_ShouldProvideQueryParams_WhenQueriesAndSearchProvided() + { + // Arrange + var query = Query.Limit(5); + var search = "SearchString"; + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId(), + Queries = [query], + Search = search + }; + + var expectedQueryParams = new Dictionary + { + { "queries[]", query.GetQueryString() }, + { "search", search } + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams/{request.TeamId}/memberships") + .ExpectedHeaders() + .WithQueryString($"queries[]={query.GetQueryString()}&search={search}") + .Respond(TestConstants.AppJson, TestConstants.LogsListResponse); + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.True(result.Success); + } + + [Fact] + public async Task ListTeamMemberships_ShouldHandleException_WhenApiCallFails() + { + // Arrange + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId() + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams/{request.TeamId}/memberships") + .ExpectedHeaders() + .Respond(HttpStatusCode.BadRequest, TestConstants.AppJson, TestConstants.AppwriteError); + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.True(result.IsError); + Assert.True(result.IsAppwriteError); + } + + [Fact] + public async Task ListTeamMemberships_ShouldReturnErrorResponse_WhenExceptionOccurs() + { + // Arrange + var request = new ListTeamMembershipsRequest + { + TeamId = IdUtils.GenerateUniqueId() + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams/{request.TeamId}/memberships") + .ExpectedHeaders() + .Throw(new HttpRequestException("An error occurred")); + + // Act + var result = await _appwriteClient.Teams.ListTeamMemberships(request); + + // Assert + Assert.False(result.Success); + Assert.True(result.IsInternalError); + Assert.Equal("An error occurred", result.Result.AsT2.Message); + } +} diff --git a/tests/PinguApps.Appwrite.Server.Tests/Clients/Teams/TeamsClientTests.ListTeams.cs b/tests/PinguApps.Appwrite.Server.Tests/Clients/Teams/TeamsClientTests.ListTeams.cs index c5c9efb..93ec21d 100644 --- a/tests/PinguApps.Appwrite.Server.Tests/Clients/Teams/TeamsClientTests.ListTeams.cs +++ b/tests/PinguApps.Appwrite.Server.Tests/Clients/Teams/TeamsClientTests.ListTeams.cs @@ -1,6 +1,7 @@ using System.Net; using PinguApps.Appwrite.Shared.Requests.Teams; using PinguApps.Appwrite.Shared.Tests; +using PinguApps.Appwrite.Shared.Utils; using RichardSzalay.MockHttp; namespace PinguApps.Appwrite.Server.Tests.Clients.Teams; @@ -23,6 +24,36 @@ public async Task ListTeams_ShouldReturnSuccess_WhenApiCallSucceeds() Assert.True(result.Success); } + [Fact] + public async Task ListTeams_ShouldProvideQueryParams_WhenQueriesAndSearchProvided() + { + // Arrange + var query = Query.Limit(5); + var search = "SearchString"; + var request = new ListTeamsRequest + { + Queries = [query], + Search = search + }; + + var expectedQueryParams = new Dictionary + { + { "queries[]", query.GetQueryString() }, + { "search", search } + }; + + _mockHttp.Expect(HttpMethod.Get, $"{TestConstants.Endpoint}/teams") + .ExpectedHeaders() + .WithQueryString($"queries[]={query.GetQueryString()}&search={search}") + .Respond(TestConstants.AppJson, TestConstants.LogsListResponse); + + // Act + var result = await _appwriteClient.Teams.ListTeams(request); + + // Assert + Assert.True(result.Success); + } + [Fact] public async Task ListTeams_ShouldHandleException_WhenApiCallFails() { From 4a945aac69b55602840087134ef9eff6b9ec5c7b Mon Sep 17 00:00:00 2001 From: Matthew Parker Date: Sat, 19 Oct 2024 23:40:31 +0100 Subject: [PATCH 4/5] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1e06e6c..bd59118 100644 --- a/README.md +++ b/README.md @@ -141,11 +141,11 @@ string emailAddressOrErrorMessage = userResponse.Result.Match( ## ⌛ Progress -![Server & Client - 110 / 318](https://img.shields.io/badge/Server_&_Client-110%20%2F%20318-gold?style=for-the-badge) +![Server & Client - 112 / 318](https://img.shields.io/badge/Server_&_Client-112%20%2F%20318-gold?style=for-the-badge) -![Server - 58 / 225](https://img.shields.io/badge/Server-58%20%2F%20225-red?style=for-the-badge) +![Server - 59 / 225](https://img.shields.io/badge/Server-59%20%2F%20225-red?style=for-the-badge) -![Client - 52 / 93](https://img.shields.io/badge/Client-52%20%2F%2093-gold?style=for-the-badge) +![Client - 53 / 93](https://img.shields.io/badge/Client-53%20%2F%2093-gold?style=for-the-badge) ### 🔑 Key | Icon | Definition | @@ -256,7 +256,7 @@ string emailAddressOrErrorMessage = userResponse.Result.Match( | [Update Phone Verification](https://appwrite.io/docs/references/1.6.x/server-rest/users#updatePhoneVerification) | ❌ | ✅ | ### Teams -![Teams - 10 / 26](https://img.shields.io/badge/Teams-10%20%2F%2026-gold?style=for-the-badge) +![Teams - 12 / 26](https://img.shields.io/badge/Teams-12%20%2F%2026-gold?style=for-the-badge) | Endpoint | Client | Server | |:-:|:-:|:-:| @@ -264,8 +264,8 @@ string emailAddressOrErrorMessage = userResponse.Result.Match( | [Create Team](https://appwrite.io/docs/references/1.6.x/client-rest/teams#create) | ✅ | ✅ | | [Get Team](https://appwrite.io/docs/references/1.6.x/client-rest/teams#get) | ✅ | ✅ | | [Update Name](https://appwrite.io/docs/references/1.6.x/client-rest/teams#updateName) | ✅ | ✅ | -| [Delete Team](https://appwrite.io/docs/references/1.6.x/client-rest/teams#delete) | ⬛ | ⬛ | -| [List Team Memberships](https://appwrite.io/docs/references/1.6.x/client-rest/teams#listMemberships) | ⬛ | ⬛ | +| [Delete Team](https://appwrite.io/docs/references/1.6.x/client-rest/teams#delete) | ✅ | ✅ | +| [List Team Memberships](https://appwrite.io/docs/references/1.6.x/client-rest/teams#listMemberships) | ✅ | ✅ | | [Create Team Membership](https://appwrite.io/docs/references/1.6.x/client-rest/teams#createMembership) | ⬛ | ⬛ | | [Get Team Membership](https://appwrite.io/docs/references/1.6.x/client-rest/teams#getMembership) | ⬛ | ⬛ | | [Update Membership](https://appwrite.io/docs/references/1.6.x/client-rest/teams#updateMembership) | ⬛ | ⬛ | From a0c564cd94615a3d3a773fd3e2162255b3441f08 Mon Sep 17 00:00:00 2001 From: Matthew Parker Date: Sat, 19 Oct 2024 23:53:41 +0100 Subject: [PATCH 5/5] removed AI action --- .github/workflows/pr.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e90d9ae..476d6f7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,20 +15,3 @@ jobs: contents: read issues: read checks: write - - run_code_review: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Code Review GPT - uses: mattzcarey/code-review-gpt@v0.1.10 - with: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - MODEL: 'gpt-4o' - GITHUB_TOKEN: ${{ github.token }}