Skip to content
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

feat: allow user to use other forges #16

Merged
merged 91 commits into from
Aug 25, 2023

Conversation

aaa006bd
Copy link
Collaborator

@aaa006bd aaa006bd commented Aug 8, 2023

  • load forge from db
  • login via configured forges (initally github for now)
  • allow user to connect additional forges
  • add github as initial forge on start from .env
  • save forges accessToken and refreshToken to DB
  • refresh forge accessToken if needed (before using forge client)
  • add endpoint to load user profile and use the user data in UI (avatar)
  • refresh user jwt cookie if needed
  • allow user to add repo from one of the connected forges (select connected forge first, search for repo)
  • add new repo to database when user selects to add it (currently part of the indexing endpoint)
  • add separate indexing endpoint (should almost be done using the current endpoint)
  • load active repos from database (currently loaded by looping folders)
  • fix passing credentials to clone api endpoint
  • use netrc credentials to clone private repos

@aaa006bd aaa006bd linked an issue Aug 8, 2023 that may be closed by this pull request
@anbraten anbraten changed the title feat: gitlab provider workflow feat: allow user to connect to other forges Aug 8, 2023
@anbraten
Copy link
Contributor

anbraten commented Aug 9, 2023

@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
Copy link
Collaborator Author

Thanks for mentioning it. I forgot about these.

@anbraten anbraten changed the title feat: allow user to connect to other forges feat: allow user to use other forges Aug 24, 2023
composables/auth.ts Outdated Show resolved Hide resolved
composables/auth.ts Outdated Show resolved Hide resolved
server/api/repos/[repo_id]/clone.post.ts Outdated Show resolved Hide resolved
server/api/repos/[repo_id]/clone.post.ts Outdated Show resolved Hide resolved
@anbraten
Copy link
Contributor

anbraten commented Aug 25, 2023

@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
Copy link
Collaborator Author

@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
Copy link
Contributor

@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/'

@anbraten anbraten merged commit 5156e2b into main Aug 25, 2023
2 checks passed
@anbraten anbraten deleted the 11-create-a-work-flow-for-github-provider branch August 25, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a work flow for gitlab provider
2 participants