Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

disq
Copy link
Member

@disq disq commented May 2, 2025

Follow-up to #2106

Plugins use regular team API keys for usage reports, not platform-specific local API keys.

@disq disq requested review from a team and przste-go May 2, 2025 10:50
@github-actions github-actions bot added the fix label May 2, 2025
@disq disq changed the title fix: Pass installation ID for correct type of api keys from env to usage report fix: Pass installation ID for correct type of API keys from env to usage report May 2, 2025
@github-actions github-actions bot added fix and removed fix labels May 2, 2025
@disq disq requested a review from murarustefaan May 2, 2025 10:51
premium/usage.go Outdated
switch tokenType {
case auth.SyncRunAPIKey, auth.SyncTestConnectionAPIKey:
case auth.APIKey:
return os.Getenv("_CQ_INSTALLATION_ID")
Copy link
Member

Choose a reason for hiding this comment

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

Why switch on token type at all and not always return os.Getenv("_CQ_INSTALLATION_ID")?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can also do that, yes

Copy link
Member Author

Choose a reason for hiding this comment

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

Just did that in 63fb2dc

@disq disq changed the title fix: Pass installation ID for correct type of API keys from env to usage report fix: Pass installation ID from env for usage report May 2, 2025
@github-actions github-actions bot added fix and removed fix labels May 2, 2025
@disq disq added the automerge label May 2, 2025
@kodiakhq kodiakhq bot merged commit 4d36bfb into main May 2, 2025
13 checks passed
@kodiakhq kodiakhq bot deleted the fix/determine-installation-id-for-platform branch May 2, 2025 11:04
kodiakhq bot pushed a commit that referenced this pull request May 6, 2025
🤖 I have created a release *beep* *boop*
---


## [4.79.1](v4.79.0...v4.79.1) (2025-05-03)


### Bug Fixes

* **deps:** Update golang.org/x/exp digest to 7e4ce0a ([#2135](#2135)) ([efb8813](efb8813))
* **deps:** Update module github.com/grpc-ecosystem/go-grpc-middleware/v2 to v2.3.1 ([#2136](#2136)) ([5534187](5534187))
* **deps:** Update module github.com/rs/zerolog to v1.34.0 ([#2138](#2138)) ([e1bcb05](e1bcb05))
* **deps:** Update module google.golang.org/grpc to v1.72.0 ([#2141](#2141)) ([a0f27a3](a0f27a3))
* Pass installation ID from env for usage report ([#2140](#2140)) ([4d36bfb](4d36bfb))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants