Skip to content

[Wakatime]: Support customize API base URL#17118

Merged
raycastbot merged 6 commits intoraycast:mainfrom
Yukaii:chore/support-custom-api-url-wakatime
Feb 28, 2025
Merged

[Wakatime]: Support customize API base URL#17118
raycastbot merged 6 commits intoraycast:mainfrom
Yukaii:chore/support-custom-api-url-wakatime

Conversation

@Yukaii
Copy link
Contributor

@Yukaii Yukaii commented Feb 17, 2025

Description

  • Support customize API Base URL

Screencast

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: wakatime Issues related to the wakatime extension labels Feb 17, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Feb 17, 2025

Thank you for your contribution! 🎉

🔔 @iammola you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

Due to our current reduced availability, the initial review may take up to 10-15 business days

@pernielsentikaer
Copy link
Collaborator

Did you remove apiKey on purpose?

@pernielsentikaer
Copy link
Collaborator

@greptileai please also check this

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds support for customizing the WakaTime API base URL, allowing users to connect to self-hosted instances or alternative API endpoints.

  • Added a new global preference apiBaseUrl in extensions/wakatime/package.json with default value of "https://wakatime.com/api/v1"
  • Modified extensions/wakatime/src/utils/api.ts to retrieve and use the custom API base URL from preferences
  • Implementation properly falls back to the default URL when no custom URL is provided
  • The change maintains backward compatibility while adding flexibility for users with self-hosted WakaTime instances

💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

Yukaii and others added 2 commits February 28, 2025 18:50
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@Yukaii
Copy link
Contributor Author

Yukaii commented Feb 28, 2025

Did you remove apiKey on purpose?

Yes. Because the extension level already has that preference. The one I removed was at the command level.

@pernielsentikaer
Copy link
Collaborator

@iammola do you want to check this?

Copy link
Contributor

@iammola iammola left a comment

Choose a reason for hiding this comment

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

Looks good! I saw this earlier.

Just feeding my curiosity, @Yukaii, in what scenarios would you need a custom API key?

@Yukaii
Copy link
Contributor Author

Yukaii commented Feb 28, 2025

I host a https://github.com/muety/wakapi on my homelab 🤩

Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

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

Hi 👋

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit 521dd0a into raycast:main Feb 28, 2025
9 checks passed
@github-actions
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/iammola/wakatime

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@Yukaii Yukaii deleted the chore/support-custom-api-url-wakatime branch March 1, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: wakatime Issues related to the wakatime extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants