-
Notifications
You must be signed in to change notification settings - Fork 285
feat: multi-forge support — adapter pattern + Gitea #2842
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
20ce142
docs(contributing): replace github-only stance with multi-forge policy
afonsojramos 8ab2764
feat(types): add Forge type and required Account.forge field with mig…
afonsojramos a43767b
feat(forges): add ForgeAdapter interface, registry, and GitHub adapter
afonsojramos 2078d85
refactor(forges): route notifications, features, and auth through ada…
afonsojramos 9e56554
test(notifications): expect mark-as-done to fall back to mark-as-read…
afonsojramos c1b68fa
refactor(login): route PAT login through forge adapter
afonsojramos 188c023
refactor(login): render login methods from forge adapter registry
afonsojramos 6ddac7c
feat(forges/gitea): add Gitea adapter and login flow
afonsojramos 8834c83
refactor(links): route developer settings URL through forge adapter
afonsojramos 7591e7b
fix(forges): preserve refresh response shape and limit gitea scope sh…
afonsojramos e4ef3ed
refactor(forges/github): relocate GitHub modules into forges/github
afonsojramos ebad481
fix(forges/github): point graphql codegen output and import paths at …
afonsojramos db282cc
fix(auth): coerce missing enterprise version header to null
afonsojramos 29a6c5e
test(settings): drop obsolete snapshot for go-back test
afonsojramos 05ebcae
test(forges): cover registry dispatch and unknown-forge errors
afonsojramos f52c75c
test(forges/gitea): cover client request paths and pagination
afonsojramos f7668b1
test(forges/gitea): cover adapter dispatch and capabilities
afonsojramos eac24ad
test(forges/github): cover adapter dispatch and login fields
afonsojramos f032863
test(forges/github): cover raw notification transform
afonsojramos 4d9e45f
style(forges): apply biome formatter to new test files
afonsojramos ff936a5
fix(test): widen latest_comment_url cast to allow null in transform test
afonsojramos ba011e6
chore(codeowners): route forge adapters to their maintainers
afonsojramos dda29d1
docs(readme): add forge adapter support matrix
afonsojramos 36fdcf7
docs(readme): document forge status symbols (experimental, in progress)
afonsojramos 9a654d7
docs(readme): drop Bitbucket Data Center from forge matrix (EOL)
afonsojramos 2e1d93f
refactor(forges): move OAuth scope checks onto the adapter
afonsojramos e2adb83
refactor(forges): address review comments
afonsojramos 576d96a
Merge remote-tracking branch 'origin/main' into multi-platform-support
afonsojramos 962a743
fix(forges/gitea): adopt new ISafeStorageDecryptResult shape from main
afonsojramos 19e0d89
fix(forges/gitea): pin requests to account hostname and redact error …
afonsojramos 4531c44
fix(forges): merge getAdapter, derive KNOWN_FORGES from registry, san…
afonsojramos 75099da
refactor(forges): normalise RefreshAccountData and route token-cache …
afonsojramos c718666
refactor(forges): inline single-use wrappers, type LoginRouteState, a…
afonsojramos f2b688b
fix(forges/gitea): throw on unsupported markAsDone instead of silentl…
afonsojramos 70f8bd8
refactor(types): split RawGitifyNotification from GitifyNotification …
afonsojramos 996ffda
refactor(forges): expose getDisplayHelpers on adapter so shared code …
afonsojramos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| * @afonsojramos @bmulholland @setchy | ||
|
|
||
| # Forge adapters — see MAINTAINERS.md | ||
| /src/renderer/utils/forges/github/ @afonsojramos @setchy | ||
| /src/renderer/utils/forges/gitea/ @afonsojramos @bircni |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Maintainers | ||
|
|
||
| Gitify is maintained by a small team. Each forge adapter has at least one designated maintainer responsible for triage, review, and CI for that adapter. | ||
|
|
||
| ## Core maintainers | ||
|
|
||
| - [@setchy](https://github.com/setchy) | ||
| - [@afonsojramos](https://github.com/afonsojramos) | ||
|
|
||
| ## Forge adapter maintainers | ||
|
|
||
| | Forge | Maintainer | Source | | ||
| | ------ | --------------------------------------------------- | --------------------------------------- | | ||
| | GitHub | [@setchy](https://github.com/setchy), [@afonsojramos](https://github.com/afonsojramos) | `src/renderer/utils/forges/github/` | | ||
| | Gitea | [@bircni](https://github.com/bircni), [@afonsojramos](https://github.com/afonsojramos) | `src/renderer/utils/forges/gitea/` | | ||
|
|
||
| ## Adding a new forge | ||
|
|
||
| See [`CONTRIBUTING.md`](./CONTRIBUTING.md#multi-forge-support) for the policy. In short: | ||
|
|
||
| 1. Open an issue proposing the forge and volunteering as its maintainer. | ||
| 2. Implement the forge behind the `ForgeAdapter` interface in `src/renderer/utils/forges/<forge-id>/`. | ||
| 3. Register the adapter in `src/renderer/utils/forges/registry.ts`. | ||
| 4. Add yourself to the table above and to `CODEOWNERS` for the adapter directory. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.