TfTHacker / obsidian42-brat

BRAT - Beta Reviewer's Auto-update Tool for Obsidian.
https://tfthacker.com/BRAT
MIT License
627 stars 34 forks source link

[FR] Set personal access token per repository #89

Open davisriedel opened 6 days ago

davisriedel commented 6 days ago

Hey 👋 it's great that #77 allows you to access private repositories. The documentation states that you can hand out a personal access token to your beta testers. However, you can only set one personal access token for all plugins. If my beta testers are also testing other private repositories, they have to change the token for each update. It would be great if one could specify a personal access token for each repo individually. This would also eliminate the need to check isPrivateRepo on each grabReleaseFileFromRepository call, if the user specifies per plugin, if it is private and provides a personal access token. One could also add a switch to use the global token on all repos if this is wanted.

If you'd like, I can open a PR that implements this, as soon as I find some time. 😄

TfTHacker commented 4 days ago

This is a great idea. Something I have hoped to add, now that I see the functionality for accessing private repos is useful.

If you can submit a PR, that would be very nice, as it will be some time before I can get around to it. However its not such a small PR. It will require some UI modification as well, along with how the keys for private repos are stored, and taking into account any update process for existing users.