feat(forge): add GitLab support (#3225) · gitify-app/gitify@6711eb7 · GitHub
Skip to content

Commit 6711eb7

Browse files
authored
feat(forge): add GitLab support (#3225)
2 parents e89ca6f + cad5e7d commit 6711eb7

34 files changed

Lines changed: 2432 additions & 8 deletions

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Gitify supports notifications from multiple Git forges. New forges may be added
130130
- **Capability-honest UI:** features unsupported by a forge (e.g. mark-as-done) must hide gracefully, not silently no-op.
131131
- **No core-platform churn:** Octicons, Octokit, and the Primer Design System remain in place. Octokit is scoped to the GitHub adapter; other adapters use plain `fetch`.
132132

133-
Currently supported forges: **GitHub** (Cloud, Enterprise Server, Enterprise Cloud with Data Residency), **Gitea** (incl. Forgejo, Codeberg) and **Bitbucket Cloud**.
133+
Currently supported forges: **GitHub** (Cloud, Enterprise Server, Enterprise Cloud with Data Residency), **Gitea** (incl. Forgejo, Codeberg), **Bitbucket Cloud** and **GitLab** (Cloud and Self-Managed).
134134

135135
#### Things we won't do
136136

‎MAINTAINERS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Gitify is maintained by a small team. Each forge adapter has at least one design
1313
| ------ | -------------------------------------------------------------------------------------- | ----------------------------------- |
1414
| GitHub | [@setchy](https://github.com/setchy), [@afonsojramos](https://github.com/afonsojramos) | `src/renderer/utils/forges/github/` |
1515
| Gitea | [@bircni](https://github.com/bircni), [@afonsojramos](https://github.com/afonsojramos) | `src/renderer/utils/forges/gitea/` |
16+
| GitLab | [@afonsojramos](https://github.com/afonsojramos) | `src/renderer/utils/forges/gitlab/` |
1617

1718
## Adding a new forge
1819

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
## Features
1212

1313
- 🔔 Unified notifications from your Git platforms
14-
- ⚒️ Multi-forge: GitHub Cloud, GitHub Enterprise, Gitea, Forgejo, Codeberg, Bitbucket Cloud
14+
- ⚒️ Multi-forge: GitHub Cloud, GitHub Enterprise, Gitea, Forgejo, Codeberg, Bitbucket Cloud, GitLab
1515
- 💻 Cross-platform: macOS, Windows, and Linux
1616
- 🎨 Customizable settings, filters and themes
1717
- 🖥️ Tray/menu bar integration
@@ -29,7 +29,7 @@ Gitify uses a forge adapter pattern so notifications can come from any compatibl
2929
| **GitHub** Enterprise Cloud with Data Residency | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
3030
| **Gitea** (incl. Forgejo, Codeberg) | ✅ | ✅ | ✅ | — | — | — |
3131
| **Bitbucket** Cloud | ✅ | ✅ | ✅ | — | — | — |
32-
| **GitLab** (todos) | 💭 | — | — | — | — | — |
32+
| **GitLab** Cloud & Self-Managed | ✅ | ✅ | ✅ | ✅ | — | ✅ |
3333
| **Azure DevOps** | 💭 | — | — | — | — | — |
3434
| **Gerrit** | 💭 | — | — | — | — | — |
3535

‎src/renderer/App.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { GiteaLoginWithPersonalAccessTokenRoute } from './routes/gitea/LoginWith
1313
import { GitHubLoginWithDeviceFlowRoute } from './routes/github/LoginWithDeviceFlow';
1414
import { GitHubLoginWithOAuthAppRoute } from './routes/github/LoginWithOAuthApp';
1515
import { GitHubLoginWithPersonalAccessTokenRoute } from './routes/github/LoginWithPersonalAccessToken';
16+
import { GitLabLoginWithPersonalAccessTokenRoute } from './routes/gitlab/LoginWithPersonalAccessToken';
1617
import { LoginRoute } from './routes/Login';
1718
import { NotificationsRoute } from './routes/Notifications';
1819
import { SettingsRoute } from './routes/Settings';
@@ -113,6 +114,10 @@ export const App = () => {
113114
element={<BitbucketLoginWithPersonalAccessTokenRoute />}
114115
path="/login/bitbucket/personal-access-token"
115116
/>
117+
<Route
118+
element={<GitLabLoginWithPersonalAccessTokenRoute />}
119+
path="/login/gitlab/personal-access-token"
120+
/>
116121
</Routes>
117122
</AppLayout>
118123
</Router>

‎src/renderer/__mocks__/account-mocks.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ export const mockGiteaAccount: Account = {
6363
user: mockGitifyUser,
6464
};
6565

66+
export const mockGitLabAccount: Account = {
67+
forge: 'gitlab',
68+
platform: 'GitLab Cloud',
69+
method: 'Personal Access Token',
70+
token: 'token-gitlab' as Token,
71+
hostname: 'gitlab.com' as Hostname,
72+
user: mockGitifyUser,
73+
};
74+
6675
export const mockBitbucketAccount: Account = {
6776
forge: 'bitbucket',
6877
platform: 'Bitbucket Cloud',

‎src/renderer/components/filters/__snapshots__/SubjectTypeFilter.test.tsx.snap‎

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
1.14 KB
Loading
51.2 KB
Loading

0 commit comments

Comments
 (0)