-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Gitea support #8131
base: main
Are you sure you want to change the base?
Gitea support #8131
Conversation
const accountAvatarUrl = project.owner?.avatar_url as string; | ||
const account = project.owner?.login as string; | ||
|
||
(account === usersGitLabAccount ? ownersRepos : result).push({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitLab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied the gitlab code and added some placeholders for the ee code yet. I am still quite new to the codebase of Gitpod, but hopefully the ee part is not to critical to run the server for now.
@ghuntley as promised on the Gitea discord this is my first draft for the Gitea integration. I can already build the code, but starting a whole deployment of Gitpod on my local pc / a cluster of my own wasn't working for me yet. Could you give me some advise on this or are there any existing integration tests I could use to test it? |
/werft run 👎 not authorized |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
async getProviderRepositoriesForUser(params: { user: User, provider: AuthProviderInfo }): Promise<ProviderRepository[]> { | ||
const token = await this.tokenProvider.getTokenForHost(params.user, params.provider.host); | ||
const oauthToken = token.value; | ||
const api = Gitea.create(`https://${params.provider.host}`, oauthToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two tiny nitpicks, 1. It is possible for gitea to exist on a subpath (eg. https://example.com/gitea/ etc..), and 2. some users may wish not to use https (not a great idea, but one that people make for a variety of reasons).
You may wish instead of host, to use something like baseURL
where users can fill the url scheme and full url (incl. a sub-path if they so require).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points. I will have a look and do some tests later. Currently my main problem is still getting a Gitpod instance with those changes up and running. 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the issue a matter of compute resources available to you, or being able to apply your changes to a running deploy? If the former, the Gitea project likely can assist in providing compute resources, if the later I'm sure if you post the issue you are running into then someone can help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I currently using a cluster on vultr with with some credit I had lying around, so should be fine for the beginning, but I will come back to your offer if needed. Main problem is building images of the needed components and deploying those atm. It requires some manual intervention which loads to a pretty slow dev cycle as I have to rebuild the server, deploy it and look for changes ... The gitpod team seems to use telepresence for that, but I am not quite sure how to integrate that with my own cluster.
Whoop! Whoop! Authentication is working now and I got my first Gitea workspace running 🎉 |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
/werft run 👍 started the job as gitpod-build-gitea-fork.1 |
/werft run 👍 started the job as gitpod-build-gitea-fork.2 |
👋 Dropped on by to have a look at the work so far.
I ran kick-off builds from you as needed (let's coordinate via Discord?) and that will provision a deployment observations
outstanding items
gitea
|
@ghuntley Are none Gitpod internal-team accounts disabled on staging environments? Instead of using https://try.gitea.io maybe https://gitea.com could be used? CC @lunny @techknowlogick |
Yes, https://gitea.com is the formal site. https://try.gitea.io just for test and the repositories will be deleted when disk is full. |
Hello everyone :D I would love to try it Thanks a lot for your amazing work ! |
@IDerr I haven't worked on it for a while. My last problem was executing the tests for the |
ok, i see, I'll try to see to modify some code, and see if I can make it work on my side. Thanks a lot |
Description
This PR implements basic Gitea support.
Related Issue(s)
Closes #80
How to test
Good question how to test this from start to end 🙈
Release Notes
Documentation
TODO
TODO