Skip to content

Audit logs endpoint - #72

Merged
bodrovis merged 2 commits into
masterfrom
audit_logs_endpoint
Jul 27, 2026
Merged

Audit logs endpoint#72
bodrovis merged 2 commits into
masterfrom
audit_logs_endpoint

Conversation

@bodrovis

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: daffb54c-e919-4094-8811-e8baed17f374

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch audit_logs_endpoint

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/_data/api_items.yml`:
- Around line 14-18: Rename the navigation property from sub_path to sub_paths
in the Audit logs entry so the existing schema recognizes “List audit logs” as a
nested navigation item.

In `@docs/additional_info/changelog.md`:
- Around line 7-12: Update the API v1 cursor pagination entry in the changelog
to explicitly document that Audit Logs pagination reads has_more and next_cursor
from the response body, placing this clarification near the existing cursor
pagination bullet.

In `@lib/elixir_lokalise_api/config.ex`:
- Around line 54-58: Update the configuration module’s documentation text near
the base_url_api_v1 and base_url_oauth2 examples so it explicitly describes API
v1 alongside API v2 and OAuth2. Keep the existing configuration examples and
environment-variable guidance unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7095f1a4-6e0e-4695-8646-f0e2745eb3a3

📥 Commits

Reviewing files that changed from the base of the PR and between 8d5a84f and 4016c33.

⛔ Files ignored due to path filters (1)
  • mix.lock is excluded by !**/*.lock
📒 Files selected for processing (20)
  • config/dev.exs
  • docs/_data/api_items.yml
  • docs/additional_info/changelog.md
  • docs/additional_info/customization.md
  • docs/api/audit-logs.md
  • docs/api/getting-started.md
  • lib/elixir_lokalise_api/collections/v1/audit_logs.ex
  • lib/elixir_lokalise_api/config.ex
  • lib/elixir_lokalise_api/cursor_pagination.ex
  • lib/elixir_lokalise_api/dynamic_resource.ex
  • lib/elixir_lokalise_api/endpoints/v1/audit_logs.ex
  • lib/elixir_lokalise_api/models/v1/audit_log.ex
  • lib/elixir_lokalise_api/processor.ex
  • lib/elixir_lokalise_api/request.ex
  • lib/elixir_lokalise_api/url_generator.ex
  • mix.exs
  • test/elixir_lokalise_api/cursor_pagination_test.exs
  • test/elixir_lokalise_api/endpoints/v1/audit_logs_test.exs
  • test/elixir_lokalise_api/processor_test.exs
  • test/elixir_lokalise_api/request_test.exs

Comment thread docs/_data/api_items.yml
Comment on lines +14 to +18
- title: Audit logs
path: audit-logs
sub_path:
- title: List audit logs
path: list-audit-logs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the navigation schema’s sub_paths key.

sub_path does not match the key used by every other section, so “List audit logs” will not be included as a nested navigation item.

Proposed fix
-  sub_path:
+  sub_paths:
📝 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.

Suggested change
- title: Audit logs
path: audit-logs
sub_path:
- title: List audit logs
path: list-audit-logs
- title: Audit logs
path: audit-logs
sub_paths:
- title: List audit logs
path: list-audit-logs
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/_data/api_items.yml` around lines 14 - 18, Rename the navigation
property from sub_path to sub_paths in the Audit logs entry so the existing
schema recognizes “List audit logs” as a nested navigation item.

Comment on lines +7 to +12
* Added support for Lokalise API v1 endpoints
* Added the Audit Logs endpoint through `ElixirLokaliseApi.V1.AuditLogs`
* Added a separate `:base_url_api_v1` configuration option for API v1 requests
* Added cursor pagination support for API v1 collections
* Added `ElixirLokaliseApi.CursorPagination` helpers for checking and retrieving the next cursor
* Updated URL generation to prevent duplicate slashes when joining base URLs and endpoint paths

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document that API v1 cursor fields come from the response body.

The entry names cursor pagination but omits the required body-level semantics for has_more and next_cursor; add this explicitly near the cursor-pagination bullet. As per path instructions, “API v1 cursor pagination semantics for Audit Logs: has_more/next_cursor come from the response body.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/additional_info/changelog.md` around lines 7 - 12, Update the API v1
cursor pagination entry in the changelog to explicitly document that Audit Logs
pagination reads has_more and next_cursor from the response body, placing this
clarification near the existing cursor pagination bullet.

Source: Path instructions

Comment on lines +54 to 58
config :elixir_lokalise_api, base_url_api_v1: "YOUR_API_BASE_URL_v1"
config :elixir_lokalise_api, base_url_oauth2: "YOUR_OAUTH2_BASE_URL"

You can also use `{:system, "ENV_VAR_NAME"}` to set it via environment variables.
"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Include API v1 in the base URL documentation.

Line [52] still describes only APIv2/OAuth2 even though Line [54] adds base_url_api_v1. Update the wording so the public documentation accurately covers all supported base URLs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/elixir_lokalise_api/config.ex` around lines 54 - 58, Update the
configuration module’s documentation text near the base_url_api_v1 and
base_url_oauth2 examples so it explicitly describes API v1 alongside API v2 and
OAuth2. Keep the existing configuration examples and environment-variable
guidance unchanged.

@bodrovis
bodrovis merged commit 0de4b4c into master Jul 27, 2026
4 checks passed
@bodrovis
bodrovis deleted the audit_logs_endpoint branch July 27, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant