geprog / CodeCaptain

Ask codecaptain everything you want to know about the source-code or issues of your project
https://codecaptain.ai
GNU Affero General Public License v3.0
7 stars 3 forks source link

feat: allow user to use other forges #16

Closed aaa006bd closed 1 year ago

aaa006bd commented 1 year ago
anbraten commented 1 year ago

@aaa006bd Instead of storing the access and refresh token expiration dates you could use the jwt library and decode the token as the expiration date is saved in the token as well

aaa006bd commented 1 year ago

Thanks for mentioning it. I forgot about these.

aaa006bd commented 1 year ago

@anbraten I had a question regarding the flow of the forges. First when we connect we will be shown a list of forges if available and we can connect to each of them. After connecting we would need to go on a different view where user can search for the repos. When we activate it first we will insert them in the db and the perform clone+indexing. Right now getting the repositories through the api is part of the clone.post.ts. But fetching repositories via the api should be then part of activation and then inserting? In the UI the we somehow have to route from the view /repo/add but I think that shouldnt be the case. I am bit confused about the state of the whole flow at the moment.

anbraten commented 1 year ago

@aaa006bd I did quite some cleanup and pushed some improvements. Could you test the whole app on your system (searching and indexing github & gitlab repos, chatting with both repos) as well.

aaa006bd commented 1 year ago

@aaa006bd I did quite some cleanup and pushed some improvements. Could you test the whole app on your system (searching and indexing github & gitlab repos, chatting with both repos) as well.

@anbraten sure. I am a bit busy today. I will do it tomorrow and update it in this PR.

anbraten commented 1 year ago

@aaa006bd Last remaining issue is that we get an error when using the accesstoken to clone repos from gitlab:

remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://git.geprog.com/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied
fatal: Authentication failed for 'https://....git/'