-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for private repos #10
Comments
For my phabricator revisions widget, phabricator allows you to generate an API key that I the user can paste into the config. GitHub has a few forms of authentication to the API: I don't really want to have to embed a Qt Webkit browser window to perform an OAuth login in the widget. A personal login token might be useful, but it's probably for personal use, and not for deployment to users in an app/widget. If you find time to fuss with the code before me: git clone https://github.com/Zren/plasma-applet-githubissues
cd plasma-applet-githubissues
sudo apt install plasma-sdk # install plasmoidviewer And to test run:
You can modify the default config values in Most of the GitHub logic is in |
Using basic http authentication you can pass the request to the API with an 'Authorization' header in the http get request. The user would have to create a token for the application, which would need a new field, but once the token is pasted in you should good. The format is username:token encoded into base64 and looks like this
I am currently (as I am writing this) messing around with doing this on my end and will update if i figure anything out later. |
I have NO idea what i'm doing in QML. I'm not sure what/how/who/wtf this language is but i managed to hack my way through it. For those coming here from google who just 'Need' this to work for themselves here's what you do BIG ASS DISCLAIMERSeriously, don't do this unless you need to. This is an extremely gross way of doing it, and could break a lot of things as it is highly untested. This is more proof of concept. If you add any repos that are NOT yours then you will still be passing your token for authentication. you probably already download and installed the plasmoid so let's assume you're doing this in a live environment
0a) now, make the token look like this <username>:<token> ex: BobRoss:124skjsaufbawoaos 0b) convert that (BobRoss:124skjsaufbawoaos) to base64 (find online, or do in notepad++)
You will need to keep
now when the plasmoid goes to fetch your data, you are authenticating it to be able to access your items. You'll also need to refresh the plasmoid / restart / log off. Idk what was happening on my end, but it was being a pain after these changes. Good luck googlers! |
Since there were some inconsistencies in guide above, here is more accurate way of doing this.
If you did everything accordingly you should see issues instantly, even without refreshing (if your private repositories were already set in settings) Of course proper functionality could be achieved by adding new field in config view and binding that value to |
Hey there, this works really well - great idea. I was wondering if there was support (or planned support) for private repositories? You might be able to read an API token from a standard place in
~/.
or maybe add an input box for it in the configuration menu.Would be interested to hear your thoughts on implementation, or if you're interested, I might be able to take a look at knocking it out.
The text was updated successfully, but these errors were encountered: