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

Gitea support #8131

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
further dashboard adjustments
  • Loading branch information
anbraten committed Mar 5, 2022
commit 7ae3857a9c958586ad4f3b4a33133f92f7695579
2 changes: 1 addition & 1 deletion components/dashboard/src/App.tsx
Original file line number Diff line number Diff line change
@@ -416,7 +416,7 @@ function App() {
toRender = <CreateWorkspace contextUrl={hash} />;
} else if (isWsStart) {
toRender = <StartWorkspace {...parseProps(hash, window.location.search)} />;
} else if (/^(github|gitlab)\.com\/.+?/i.test(window.location.pathname)) {
} else if (/^(github|gitlab|gitea)\.com\/.+?/i.test(window.location.pathname)) {
let url = new URL(window.location.href)
url.hash = url.pathname
url.pathname = '/'
2 changes: 1 addition & 1 deletion components/dashboard/src/Setup.tsx
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ export default function Setup() {
})();
}

const headerText = "Configure a Git integration with a GitLab or GitHub instance."
const headerText = "Configure a Git integration with a GitLab, GitHub or Gitea instance."

return <div>
{!showModal && (
9 changes: 8 additions & 1 deletion components/dashboard/src/settings/Integrations.tsx
Original file line number Diff line number Diff line change
@@ -384,7 +384,7 @@ function GitIntegrations() {
<div className="flex items-start sm:justify-between mb-2">
<div>
<h3>Git Integrations</h3>
<h2>Manage Git integrations for GitLab or GitHub self-hosted instances.</h2>
<h2>Manage Git integrations for GitLab, GitHub or Gitea self-hosted instances.</h2>
</div>
{providers.length !== 0
?
@@ -603,6 +603,9 @@ export function GitIntegrationModal(props: ({
case "GitLab":
settingsUrl = `${host}/-/profile/applications`;
break;
case "Gitea":
settingsUrl = `${host}/user/settings/applications`;
break;
default: return undefined;
}
let docsUrl = ``;
@@ -613,6 +616,9 @@ export function GitIntegrationModal(props: ({
case "GitLab":
docsUrl = `https://www.gitpod.io/docs/gitlab-integration/#oauth-application`;
break;
case "Gitea":
docsUrl = `https://www.gitpod.io/docs/gitea-integration/#oauth-application`;
break;
default: return undefined;
}

@@ -653,6 +659,7 @@ export function GitIntegrationModal(props: ({
onChange={(e) => setType(e.target.value)}>
<option value="GitHub">GitHub</option>
<option value="GitLab">GitLab</option>
<option value="GitLab">Gitea</option>
</select>
</div>
)}