Skip to content

feat(openapi): add Google Analytics API presets - #75

Merged
aryasaatvik merged 1 commit into
devfrom
feat/google-analytics-api-presets
Aug 22, 2026
Merged

feat(openapi): add Google Analytics API presets#75
aryasaatvik merged 1 commit into
devfrom
feat/google-analytics-api-presets

Conversation

@aryasaatvik

Copy link
Copy Markdown
Owner

Summary

Add Google Analytics Data and Google Analytics Admin as built-in Google Discovery integrations. Both default to the least-privilege analytics.readonly OAuth scope.

API presets

Integration Discovery API Default access Health check
Google Analytics Data analyticsdata.v1beta Read-only None; reports require a property
Google Analytics Admin analyticsadmin.v1beta Read-only accountSummaries.list

Validation

  • oxfmt --check on changed files
  • oxlint --deny-warnings on changed TypeScript files
  • vitest run in @executor-js/plugin-openapi (270 tests)

Expose the GA4 Data and Analytics Admin Discovery APIs as built-in Google integrations while keeping their default OAuth grant read-only.
@aryasaatvik
aryasaatvik merged commit f00fb2f into dev Aug 22, 2026
3 of 36 checks passed
@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds Google Analytics Data and Analytics Admin as built-in Google Discovery presets with read-only OAuth access. It also adds Analytics Admin health-check coverage, but the configured operation name does not match the generated tool path.

  • Adds Analytics Data and Analytics Admin preset metadata and Discovery endpoints.
  • Assigns both integrations the analytics.readonly OAuth scope and standard-user audience.
  • Adds an Analytics Admin discovery fixture, health check, classification assertions, and snapshots.

Confidence Score: 4/5

The Analytics Admin health-check operation mismatch should be fixed before merging because it prevents connection validation from resolving the generated tool.

Discovery conversion removes the analyticsadmin. service prefix, while the new health check searches for the full prefixed operation using exact tool-name equality.

Files Needing Attention: packages/plugins/openapi/src/providers/google/presets.ts, packages/plugins/openapi/src/providers/google/presets.test.ts

Important Files Changed

Filename Overview
packages/plugins/openapi/src/providers/google/presets.ts Adds both Analytics presets, OAuth scopes, and an Analytics Admin health check whose operation name retains a service prefix removed during conversion.
packages/plugins/openapi/src/providers/google/presets.test.ts Adds scope and catalog coverage plus an Admin fixture, but its health-check assertion expects the same incompatible full operation name.
packages/plugins/openapi/src/providers/google/snapshots/presets.test.ts.snap Updates the OAuth-audience snapshot to classify both new presets as standard-user integrations.

Fix all with Greploop Fix All in Codex Fix All in Cursor Cloud Agents Fix All in Claude Code Fix All in Cursor

Reviews (1): Last reviewed commit: "feat(openapi): add Google Analytics API ..." | Re-trigger Greptile

args: { part: "id", mine: true },
},
"google-search-console": { operation: "webmasters.sites.list" },
"google-analytics-admin": { operation: "analyticsadmin.accountSummaries.list" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Health check uses wrong tool name

When an Analytics Admin connection is checked, conversion strips the analyticsadmin. prefix and generates accountSummaries.list, but this health check searches for analyticsadmin.accountSummaries.list, causing validation to return an unknown “operation not found” result without probing the connection.

Knowledge Base Used: Plugin ecosystem

Fix in Codex Fix in Cursor Cloud Agents Fix in Claude Code Fix in Cursor

aryasaatvik added a commit that referenced this pull request Aug 23, 2026
Add Google Analytics Data and Google Analytics Admin as built-in Google
Discovery integrations. Both default to the least-privilege
`analytics.readonly` OAuth scope.

| Integration | Discovery API | Default access | Health check |
| --- | --- | --- | --- |
| Google Analytics Data | `analyticsdata.v1beta` | Read-only | None;
reports require a property |
| Google Analytics Admin | `analyticsadmin.v1beta` | Read-only |
`accountSummaries.list` |

- `oxfmt --check` on changed files
- `oxlint --deny-warnings` on changed TypeScript files
- `vitest run` in `@executor-js/plugin-openapi` (270 tests)
aryasaatvik added a commit that referenced this pull request Aug 27, 2026
Add Google Analytics Data and Google Analytics Admin as built-in Google
Discovery integrations. Both default to the least-privilege
`analytics.readonly` OAuth scope.

| Integration | Discovery API | Default access | Health check |
| --- | --- | --- | --- |
| Google Analytics Data | `analyticsdata.v1beta` | Read-only | None;
reports require a property |
| Google Analytics Admin | `analyticsadmin.v1beta` | Read-only |
`accountSummaries.list` |

- `oxfmt --check` on changed files
- `oxlint --deny-warnings` on changed TypeScript files
- `vitest run` in `@executor-js/plugin-openapi` (270 tests)
aryasaatvik added a commit that referenced this pull request Aug 28, 2026
Add Google Analytics Data and Google Analytics Admin as built-in Google
Discovery integrations. Both default to the least-privilege
`analytics.readonly` OAuth scope.

| Integration | Discovery API | Default access | Health check |
| --- | --- | --- | --- |
| Google Analytics Data | `analyticsdata.v1beta` | Read-only | None;
reports require a property |
| Google Analytics Admin | `analyticsadmin.v1beta` | Read-only |
`accountSummaries.list` |

- `oxfmt --check` on changed files
- `oxlint --deny-warnings` on changed TypeScript files
- `vitest run` in `@executor-js/plugin-openapi` (270 tests)
aryasaatvik added a commit that referenced this pull request Aug 29, 2026
Add Google Analytics Data and Google Analytics Admin as built-in Google
Discovery integrations. Both default to the least-privilege
`analytics.readonly` OAuth scope.

| Integration | Discovery API | Default access | Health check |
| --- | --- | --- | --- |
| Google Analytics Data | `analyticsdata.v1beta` | Read-only | None;
reports require a property |
| Google Analytics Admin | `analyticsadmin.v1beta` | Read-only |
`accountSummaries.list` |

- `oxfmt --check` on changed files
- `oxlint --deny-warnings` on changed TypeScript files
- `vitest run` in `@executor-js/plugin-openapi` (270 tests)
aryasaatvik added a commit that referenced this pull request Aug 29, 2026
Add Google Analytics Data and Google Analytics Admin as built-in Google
Discovery integrations. Both default to the least-privilege
`analytics.readonly` OAuth scope.

| Integration | Discovery API | Default access | Health check |
| --- | --- | --- | --- |
| Google Analytics Data | `analyticsdata.v1beta` | Read-only | None;
reports require a property |
| Google Analytics Admin | `analyticsadmin.v1beta` | Read-only |
`accountSummaries.list` |

- `oxfmt --check` on changed files
- `oxlint --deny-warnings` on changed TypeScript files
- `vitest run` in `@executor-js/plugin-openapi` (270 tests)
aryasaatvik added a commit that referenced this pull request Aug 31, 2026
Add Google Analytics Data and Google Analytics Admin as built-in Google
Discovery integrations. Both default to the least-privilege
`analytics.readonly` OAuth scope.

| Integration | Discovery API | Default access | Health check |
| --- | --- | --- | --- |
| Google Analytics Data | `analyticsdata.v1beta` | Read-only | None;
reports require a property |
| Google Analytics Admin | `analyticsadmin.v1beta` | Read-only |
`accountSummaries.list` |

- `oxfmt --check` on changed files
- `oxlint --deny-warnings` on changed TypeScript files
- `vitest run` in `@executor-js/plugin-openapi` (270 tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant