Skip to content

Feature: Gitea, Forgejo and GitLab in the Git widget - #552

Merged
SandObserver merged 2 commits into
mainfrom
feat/git-widget-services
Oct 24, 2026
Merged

SandObserver merged 2 commits into
mainfrom
feat/git-widget-services

Conversation

@SandObserver

@SandObserver SandObserver commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add a githubService select (GitHub, Gitea, Forgejo, GitLab) and a githubUrl field to the github widget; rename its picker label to Git. Existing configs without a service read GitHub.
  • Gitea and Forgejo: open pull requests from /api/v1/repos/issues/search (token owner filters, total from X-Total-Count), and the contribution grid from /api/v1/users/{user}/heatmap. The data reply carries the last year's slots as [seconds, count] pairs; the page sums them per day in the browser's time zone with the new ui/js/contribution-calendar.js.
  • GitLab: open merge requests from /api/v4/merge_requests with scope=all and author, assignee or reviewer username filters, total from X-Total. Hide the View pills and the Mentioned filter for GitLab; a saved contributions view fails as a setup error.
  • A server address without a scheme is read and linked over https.
  • Per-service token hints, card label "Merge requests" and "Merge request filters" for GitLab, in all six locales.
  • Add withManifestDefaults (api/src/widget-defaults.js): absent non-cosmetic fields take their manifest default, top level and one row deep. widgetConfigMatchesSaved and getWidgetData both read configs through it, so a config saved before a defaulted field keeps its stored secret when the editor sends the default.
  • fetchJSON returns response headers only with withHeaders: true.
  • The contributions page takes its link from profileUrl in the data reply instead of reading the widget config.

Testing
All green, including e2e. Added 33 tests for the Gitea, Forgejo and GitLab paths, manifest defaults, secret scope, the calendar across time zones, opt-in headers and token scope.

Changelog

Added

  • Read pull requests and contributions from Gitea and Forgejo, and merge requests from GitLab, in the Git widget.

Changed

  • Rename the GitHub widget to Git.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

The GitHub widget is now named Git and reads GitHub, Gitea, Forgejo or
GitLab. Gitea and Forgejo offer pull requests and the contribution
heatmap. GitLab offers merge requests. The fetch helper returns response
headers on request, for the total counts.
Fill manifest defaults into a saved widget config before the secret scope
check and before the data function reads it. Count Gitea and Forgejo heatmap
days in the browser's time zone. Read a Git server address without a scheme
over https.
@SandObserver
SandObserver merged commit 3914b2f into main Oct 24, 2026
8 checks passed
@SandObserver
SandObserver deleted the feat/git-widget-services branch October 24, 2026 19:35
stackyard-release Bot pushed a commit that referenced this pull request Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant