Issue 3 - #4
Conversation
…tPageByTitle, CreateSpace, DeleteSpace, GetSpaceByName.
|
Warning Rate limit exceeded@jefim has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 25 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughVersion 1.0.1 of Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frends.Confluence.Request
participant ConfluenceAPI
User ->> Frends.Confluence.Request: Call CustomRequest
Frends.Confluence.Request ->> ConfluenceAPI: Make Custom API Call
ConfluenceAPI -->> Frends.Confluence.Request: Return Response
Frends.Confluence.Request -->> User: Return Result
sequenceDiagram
participant User
participant Frends.Confluence.Request
participant ConfluenceAPI
User ->> Frends.Confluence.Request: Call CreatePage / UpdatePage / GetPageById / DeletePage / GetPageByTitle
Frends.Confluence.Request ->> ConfluenceAPI: Perform Page Operation
ConfluenceAPI -->> Frends.Confluence.Request: Return Page Operation Result
Frends.Confluence.Request -->> User: Return Result
sequenceDiagram
participant User
participant Frends.Confluence.Request
participant ConfluenceAPI
User ->> Frends.Confluence.Request: Call CreateSpace / DeleteSpace / GetSpaceByName
Frends.Confluence.Request ->> ConfluenceAPI: Perform Space Operation
ConfluenceAPI -->> Frends.Confluence.Request: Return Space Operation Result
Frends.Confluence.Request -->> User: Return Result
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 12
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- Frends.Confluence.Request/CHANGELOG.md (1 hunks)
- Frends.Confluence.Request/Frends.Confluence.Request.Tests/Tests.cs (2 hunks)
- Frends.Confluence.Request/Frends.Confluence.Request.Tests/TestsBase.cs (4 hunks)
- Frends.Confluence.Request/Frends.Confluence.Request.sln (2 hunks)
- Frends.Confluence.Request/Frends.Confluence.Request/Definitions/Input.cs (4 hunks)
- Frends.Confluence.Request/Frends.Confluence.Request/Frends.Confluence.Request.csproj (1 hunks)
- Frends.Confluence.Request/Frends.Confluence.Request/Request.cs (4 hunks)
Files skipped from review due to trivial changes (1)
- Frends.Confluence.Request/Frends.Confluence.Request/Frends.Confluence.Request.csproj
Additional context used
LanguageTool
Frends.Confluence.Request/CHANGELOG.md
[uncategorized] ~11-~11: The preposition “to” seems more likely in this position than the preposition “for”.
Context: ... Changed - Changed Request method name for CustomRequest. ## [1.0.0] - 2024-05-21...(AI_EN_LECTOR_REPLACEMENT_PREPOSITION_FOR_TO)
GitHub Check: build / Build on windows-latest
Frends.Confluence.Request/Frends.Confluence.Request/Request.cs
[warning] 258-258:
XML comment has badly formed XML -- 'End tag was not expected at this location.'
[warning] 30-30:
XML comment has a param tag for 'token', but there is no parameter by that name
[warning] 32-32:
Parameter 'cancellationToken' has no matching param tag in the XML comment for 'Confluence.Request(Input, CancellationToken)' (but other parameters do)
[warning] 258-258:
XML comment has badly formed XML -- 'End tag was not expected at this location.'
[warning] 30-30:
XML comment has a param tag for 'token', but there is no parameter by that name
[warning] 32-32:
Parameter 'cancellationToken' has no matching param tag in the XML comment for 'Confluence.Request(Input, CancellationToken)' (but other parameters do)
Additional comments not posted (36)
Frends.Confluence.Request/CHANGELOG.md (1)
7-7: Missing period at the end of the sentence.Add a period at the end of the sentence for consistency.
- - Added methodes: CreatePage, UpdatePage, GetPageById, DeletePage, GetPageByTitle, CreateSpace, DeleteSpace, GetSpaceByName + - Added methodes: CreatePage, UpdatePage, GetPageById, DeletePage, GetPageByTitle, CreateSpace, DeleteSpace, GetSpaceByName.Frends.Confluence.Request/Frends.Confluence.Request.sln (3)
6-6: GUID change forFrends.Confluence.Requestproject.Ensure that the new GUID is correct and consistent with the project configuration.
8-8: GUID change forFrends.Confluence.Request.Testsproject.Ensure that the new GUID is correct and consistent with the project configuration.
28-30: Addition ofExtensibilityGlobalssection.Verify that the
SolutionGuidis correct and necessary for the solution's extensibility features.Frends.Confluence.Request/Frends.Confluence.Request.Tests/TestsBase.cs (8)
3-3: New import statementusing System.Linq;.Ensure that the
System.Linqnamespace is required and used in the code.
29-29: Addition ofPageIdproperty.The
PageIdproperty is added to store the ID of the created page. Ensure its usage is consistent and necessary.
79-79: Ensure proper error handling inDeleteSpace.Verify that the
DeleteSpacemethod handles errors appropriately, such as when the space does not exist.
98-98: Ensure proper error handling inCreatePage.Verify that the
CreatePagemethod handles errors appropriately, such as when the page cannot be created.
101-101: Usage ofConfluenceMethod.CreatePageinCreatePagemethod.Ensure that the
ConfluenceMethod.CreatePageis the correct method for creating a page and verify its implementation.
106-106: Addition ofSpaceIdproperty inCreatePagemethod.Ensure that the
SpaceIdis correctly used and passed in the request.
112-112: Conditional check forPageIdassignment.Ensure that the conditional check for assigning
PageIdis correct and handles all edge cases.
114-115: Assignment ofPageIdfrom JSON response.Ensure that the
PageIdis correctly extracted from the JSON response and handles cases where theidfield is missing.Frends.Confluence.Request/Frends.Confluence.Request/Definitions/Input.cs (14)
9-9: Ensure the summary is accurate.Verify that the summary accurately represents the different methods for interacting with Confluence.
12-58: Addition ofConfluenceMethodenum.The
ConfluenceMethodenum is added to represent various Confluence interactions. Ensure that each method is correctly implemented and used.
65-65: Ensure the summary is accurate.Verify that the summary accurately represents the input parameters.
68-68: Addition ofConfluenceMethodproperty.The
ConfluenceMethodproperty is added to choose the method for interacting with Confluence. Ensure that it is correctly used in the code.
87-87: Ensure theHttpMethodproperty is used correctly.Verify that the
HttpMethodproperty is used correctly and only forCustomRequest.
106-106: Ensure theOperationSufixproperty is used correctly.Verify that the
OperationSufixproperty is used correctly and only forCustomRequest.
119-119: Ensure theQueryParametersproperty is used correctly.Verify that the
QueryParametersproperty is used correctly and only forCustomRequest.
123-128: Addition ofSpaceKeyproperty.The
SpaceKeyproperty is added for creating or deleting a space. Ensure that it is correctly used in the code.
130-135: Addition ofTitleproperty.The
Titleproperty is added for creating, updating, or getting a page by title. Ensure that it is correctly used in the code.
137-142: Addition ofBodyproperty.The
Bodyproperty is added for creating or updating a page. Ensure that it is correctly used in the code.
144-149: Addition ofPageIdproperty.The
PageIdproperty is added for updating, deleting, or getting a page by ID. Ensure that it is correctly used in the code.
151-156: Addition ofVersionproperty.The
Versionproperty is added for updating a page. Ensure that it is correctly used in the code.
158-163: Addition ofSpaceNameproperty.The
SpaceNameproperty is added for creating or getting a space by name. Ensure that it is correctly used in the code.
165-170: Addition ofSpaceIdproperty.The
SpaceIdproperty is added for creating a page. Ensure that it is correctly used in the code.Frends.Confluence.Request/Frends.Confluence.Request.Tests/Tests.cs (1)
Line range hint
45-46: LGTM!The
AcceptPrecedingSlashmethod correctly tests making requests with and without a preceding slash in the URL.Frends.Confluence.Request/Frends.Confluence.Request/Request.cs (9)
Line range hint
69-107: LGTM!The
CustomRequestmethod correctly handles making a custom request to Confluence based on the input parameters and handles various content types in the response.
152-178: LGTM!The
CreatePagemethod correctly handles creating a new page in Confluence based on the input parameters.
186-212: LGTM!The
UpdatePagemethod correctly handles updating an existing page in Confluence based on the input parameters.
220-233: LGTM!The
GetPageByIdmethod correctly handles retrieving a page from Confluence by its ID based on the input parameters.
241-254: LGTM!The
DeletePagemethod correctly handles deleting a page from Confluence by its ID based on the input parameters.
263-283: LGTM!The
GetPageByTitlemethod correctly handles retrieving a page from Confluence by its title based on the input parameters.
291-311: LGTM!The
CreateSpacemethod correctly handles creating a new space in Confluence based on the input parameters.
319-332: LGTM!The
DeleteSpacemethod correctly handles deleting a space from Confluence by its key based on the input parameters.
340-359: LGTM!The
GetSpaceByNamemethod correctly handles retrieving a space from Confluence by its name based on the input parameters.
|
|
||
| ### Changed | ||
|
|
||
| - Changed Request method name for CustomRequest. |
There was a problem hiding this comment.
Incorrect preposition 'for'.
Change 'for' to 'to' for grammatical correctness.
- - Changed Request method name for CustomRequest.
+ - Changed Request method name to CustomRequest.Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Changed Request method name for CustomRequest. | |
| - Changed Request method name to CustomRequest. |
Tools
LanguageTool
[uncategorized] ~11-~11: The preposition “to” seems more likely in this position than the preposition “for”.
Context: ... Changed - Changed Request method name for CustomRequest. ## [1.0.0] - 2024-05-21...(AI_EN_LECTOR_REPLACEMENT_PREPOSITION_FOR_TO)
| @@ -1,5 +1,15 @@ | |||
| # Changelog | |||
|
|
|||
| ## [1.0.1] - 2024-06-28 | |||
There was a problem hiding this comment.
Typo in the word 'methodes'.
Correct the typo to 'methods'.
- - Added methodes: CreatePage, UpdatePage, GetPageById, DeletePage, GetPageByTitle, CreateSpace, DeleteSpace, GetSpaceByName.
+ - Added methods: CreatePage, UpdatePage, GetPageById, DeletePage, GetPageByTitle, CreateSpace, DeleteSpace, GetSpaceByName.Committable suggestion was skipped due to low confidence.
| ); | ||
| Assert.AreEqual(200, result.StatusCode); | ||
| } | ||
|
|
There was a problem hiding this comment.
Ensure PageId is set after page creation
The RequestWithBody method creates a page but does not set the PageId static property in TestsBase. This might be necessary for subsequent tests that rely on the created page.
Assert.AreEqual(200, result.StatusCode);
+ PageId = result.Content["id"].ToString();Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Assert.AreEqual(200, result.StatusCode); | |
| PageId = result.Content["id"].ToString(); |
There was a problem hiding this comment.
The result of the RequestWithBody() method is not used in any other tests.
There was a problem hiding this comment.
@MichalFrends1, upon further investigation, it appears that PageId is indeed used in other tests. Therefore, it is important to set the PageId after page creation in the RequestWithBody() method to ensure that subsequent tests relying on this value have the correct data.
To address this, you can update the RequestWithBody() method as follows:
Assert.AreEqual(200, result.StatusCode);
PageId = result.Content["id"].ToString();This will help ensure that the PageId is correctly set for other tests that depend on it.
Analysis chain
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for the usage of PageId in the test file to confirm if it is used in other tests.
rg 'PageId' Frends.Confluence.Request/Frends.Confluence.Request.Tests/Tests.cs
Length of output: 177
Learnings added
Learnt from: MichalFrends1
PR: FrendsPlatform/Frends.Confluence#4
File: Frends.Confluence.Request/Frends.Confluence.Request.Tests/Tests.cs:159-159
Timestamp: 2024-07-01T14:46:52.579Z
Learning: The `PageId` static property in `TestsBase` is used in multiple tests within `Frends.Confluence.Request/Frends.Confluence.Request.Tests/Tests.cs`, making it important to set this value correctly after page creation in methods like `RequestWithBody()`.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
| public async Task DeleteSpace() | ||
| { | ||
| var input = new Input | ||
| { | ||
| SpaceKey = "TEST", | ||
| Username = username, | ||
| ApiToken = apiToken, | ||
| ApiVersion = ApiVersion.V2, | ||
| ConfluenceDomainName = domainName | ||
| }; | ||
| var result = await Confluence.DeleteSpace(input, CancellationToken.None); | ||
|
|
||
| Assert.AreEqual(202, result.StatusCode); | ||
| } |
There was a problem hiding this comment.
Ensure SpaceKey is set before deleting the space
The DeleteSpace method deletes a space by its key but does not ensure that SpaceKey is set before the deletion. This might lead to issues if SpaceKey is not set.
public async Task DeleteSpace()
{
var input = new Input
{
+ Assert.IsFalse(string.IsNullOrEmpty(SpaceKey), "SpaceKey is not set.");
SpaceKey = "TEST",
Username = username,
ApiToken = apiToken,
ApiVersion = ApiVersion.V2,
ConfluenceDomainName = domainName
};Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public async Task DeleteSpace() | |
| { | |
| var input = new Input | |
| { | |
| SpaceKey = "TEST", | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName | |
| }; | |
| var result = await Confluence.DeleteSpace(input, CancellationToken.None); | |
| Assert.AreEqual(202, result.StatusCode); | |
| } | |
| public async Task DeleteSpace() | |
| { | |
| var input = new Input | |
| { | |
| Assert.IsFalse(string.IsNullOrEmpty(SpaceKey), "SpaceKey is not set."); | |
| SpaceKey = "TEST", | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName | |
| }; | |
| var result = await Confluence.DeleteSpace(input, CancellationToken.None); | |
| Assert.AreEqual(202, result.StatusCode); | |
| } |
| public async Task UpdatePage() | ||
| { | ||
| var result = await Confluence.UpdatePage( | ||
| new Input | ||
| { | ||
| Title = "UpdatedTitle", | ||
| PageId = PageId, | ||
| Username = username, | ||
| ApiToken = apiToken, | ||
| ApiVersion = ApiVersion.V2, | ||
| ConfluenceDomainName = domainName, | ||
| Body = "Updated new page created by the API", | ||
| Version = 2 | ||
| }, | ||
| CancellationToken.None | ||
| ); | ||
| Assert.AreEqual(200, result.StatusCode); | ||
| } |
There was a problem hiding this comment.
Ensure PageId is set before updating the page
The UpdatePage method updates a page but does not ensure that PageId is set before the update. This might lead to issues if PageId is not set.
public async Task UpdatePage()
{
+ Assert.IsFalse(string.IsNullOrEmpty(PageId), "PageId is not set.");
var result = await Confluence.UpdatePage(Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public async Task UpdatePage() | |
| { | |
| var result = await Confluence.UpdatePage( | |
| new Input | |
| { | |
| Title = "UpdatedTitle", | |
| PageId = PageId, | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName, | |
| Body = "Updated new page created by the API", | |
| Version = 2 | |
| }, | |
| CancellationToken.None | |
| ); | |
| Assert.AreEqual(200, result.StatusCode); | |
| } | |
| public async Task UpdatePage() | |
| { | |
| Assert.IsFalse(string.IsNullOrEmpty(PageId), "PageId is not set."); | |
| var result = await Confluence.UpdatePage( | |
| new Input | |
| { | |
| Title = "UpdatedTitle", | |
| PageId = PageId, | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName, | |
| Body = "Updated new page created by the API", | |
| Version = 2 | |
| }, | |
| CancellationToken.None | |
| ); | |
| Assert.AreEqual(200, result.StatusCode); | |
| } |
| public async Task GetPageByTitle() | ||
| { | ||
| var result = await Confluence.GetPageByTitle( | ||
| new Input | ||
| { | ||
| Title = "TestPage1", | ||
| SpaceKey = "TEST", | ||
| Username = username, | ||
| ApiToken = apiToken, | ||
| ApiVersion = ApiVersion.V2, | ||
| ConfluenceDomainName = domainName | ||
| }, | ||
| CancellationToken.None | ||
| ); | ||
| Assert.AreEqual(200, result.StatusCode); |
There was a problem hiding this comment.
Ensure SpaceKey is set before retrieving the page
The GetPageByTitle method retrieves a page by its title but does not ensure that SpaceKey is set before the retrieval. This might lead to issues if SpaceKey is not set.
public async Task GetPageByTitle()
{
+ Assert.IsFalse(string.IsNullOrEmpty(SpaceKey), "SpaceKey is not set.");
var result = await Confluence.GetPageByTitle(Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public async Task GetPageByTitle() | |
| { | |
| var result = await Confluence.GetPageByTitle( | |
| new Input | |
| { | |
| Title = "TestPage1", | |
| SpaceKey = "TEST", | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName | |
| }, | |
| CancellationToken.None | |
| ); | |
| Assert.AreEqual(200, result.StatusCode); | |
| public async Task GetPageByTitle() | |
| { | |
| Assert.IsFalse(string.IsNullOrEmpty(SpaceKey), "SpaceKey is not set."); | |
| var result = await Confluence.GetPageByTitle( | |
| new Input | |
| { | |
| Title = "TestPage1", | |
| SpaceKey = "TEST", | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName | |
| }, | |
| CancellationToken.None | |
| ); | |
| Assert.AreEqual(200, result.StatusCode); |
| public async Task CreatePage() | ||
| { | ||
| var result = await Confluence.CreatePage( | ||
| new Input | ||
| { | ||
| ConfluenceMethod = ConfluenceMethod.CreatePage, | ||
| Username = username, | ||
| ApiToken = apiToken, | ||
| ApiVersion = ApiVersion.V2, | ||
| ConfluenceDomainName = domainName, | ||
| SpaceId = WorkSpaceId, | ||
| Title = "TestPage3", | ||
| Body = "This is a new page 3 created by the API" | ||
| }, | ||
| CancellationToken.None | ||
| ); | ||
| Assert.AreEqual(200, result.StatusCode); | ||
| } |
There was a problem hiding this comment.
Ensure PageId is set after page creation
The CreatePage method creates a page but does not set the PageId static property in TestsBase. This might be necessary for subsequent tests that rely on the created page.
Assert.AreEqual(200, result.StatusCode);
+ PageId = result.Content["id"].ToString();Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public async Task CreatePage() | |
| { | |
| var result = await Confluence.CreatePage( | |
| new Input | |
| { | |
| ConfluenceMethod = ConfluenceMethod.CreatePage, | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName, | |
| SpaceId = WorkSpaceId, | |
| Title = "TestPage3", | |
| Body = "This is a new page 3 created by the API" | |
| }, | |
| CancellationToken.None | |
| ); | |
| Assert.AreEqual(200, result.StatusCode); | |
| } | |
| public async Task CreatePage() | |
| { | |
| var result = await Confluence.CreatePage( | |
| new Input | |
| { | |
| ConfluenceMethod = ConfluenceMethod.CreatePage, | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName, | |
| SpaceId = WorkSpaceId, | |
| Title = "TestPage3", | |
| Body = "This is a new page 3 created by the API" | |
| }, | |
| CancellationToken.None | |
| ); | |
| Assert.AreEqual(200, result.StatusCode); | |
| PageId = result.Content["id"].ToString(); | |
| } |
| public async Task GetSpaceByName() | ||
| { | ||
| var input = new Input | ||
| { | ||
| SpaceName = "Test123", | ||
| Username = username, | ||
| ApiToken = apiToken, | ||
| ApiVersion = ApiVersion.V2, | ||
| ConfluenceDomainName = domainName | ||
| }; | ||
| await Confluence.CreateSpace(input, CancellationToken.None); | ||
| var result = await Confluence.GetSpaceByName(input, CancellationToken.None); | ||
| Assert.AreEqual(200, result.StatusCode); |
There was a problem hiding this comment.
Ensure SpaceName is set before retrieving the space
The GetSpaceByName method retrieves a space by its name but does not ensure that SpaceName is set before the retrieval. This might lead to issues if SpaceName is not set.
public async Task GetSpaceByName()
{
var input = new Input
{
+ Assert.IsFalse(string.IsNullOrEmpty(SpaceName), "SpaceName is not set.");
SpaceName = "Test123",
Username = username,
ApiToken = apiToken,
ApiVersion = ApiVersion.V2,
ConfluenceDomainName = domainName
};Committable suggestion was skipped due to low confidence.
| public async Task DeletePage() | ||
| { | ||
| var result = await Confluence.DeletePage( | ||
| new Input | ||
| { | ||
| PageId = PageId, | ||
| Username = username, | ||
| ApiToken = apiToken, | ||
| ApiVersion = ApiVersion.V2, | ||
| ConfluenceDomainName = domainName | ||
| }, | ||
| CancellationToken.None | ||
| ); | ||
| Assert.AreEqual(204, result.StatusCode); |
There was a problem hiding this comment.
Ensure PageId is set before deleting the page
The DeletePage method deletes a page by its ID but does not ensure that PageId is set before the deletion. This might lead to issues if PageId is not set.
public async Task DeletePage()
{
+ Assert.IsFalse(string.IsNullOrEmpty(PageId), "PageId is not set.");
var result = await Confluence.DeletePage(Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public async Task DeletePage() | |
| { | |
| var result = await Confluence.DeletePage( | |
| new Input | |
| { | |
| PageId = PageId, | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName | |
| }, | |
| CancellationToken.None | |
| ); | |
| Assert.AreEqual(204, result.StatusCode); | |
| public async Task DeletePage() | |
| { | |
| Assert.IsFalse(string.IsNullOrEmpty(PageId), "PageId is not set."); | |
| var result = await Confluence.DeletePage( | |
| new Input | |
| { | |
| PageId = PageId, | |
| Username = username, | |
| ApiToken = apiToken, | |
| ApiVersion = ApiVersion.V2, | |
| ConfluenceDomainName = domainName | |
| }, | |
| CancellationToken.None | |
| ); | |
| Assert.AreEqual(204, result.StatusCode); |
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- Frends.Confluence.Request/CHANGELOG.md (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- Frends.Confluence.Request/CHANGELOG.md
Issue 3
One of the tests is not passing because an account with admin permissions on Confluence is required.
Summary by CodeRabbit
ConfluenceMethodenum to specify various Confluence operations.