Repository navigation
Feature: Gitea, Forgejo and GitLab in the Git widget - #552
Merged
Merged
Conversation
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.
5 tasks done
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
githubServiceselect (GitHub, Gitea, Forgejo, GitLab) and agithubUrlfield to the github widget; rename its picker label to Git. Existing configs without a service read GitHub./api/v1/repos/issues/search(token owner filters, total fromX-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 newui/js/contribution-calendar.js./api/v4/merge_requestswithscope=alland author, assignee or reviewer username filters, total fromX-Total. Hide the View pills and the Mentioned filter for GitLab; a saved contributions view fails as a setup error.withManifestDefaults(api/src/widget-defaults.js): absent non-cosmetic fields take their manifest default, top level and one row deep.widgetConfigMatchesSavedandgetWidgetDataboth read configs through it, so a config saved before a defaulted field keeps its stored secret when the editor sends the default.fetchJSONreturns response headers only withwithHeaders: true.profileUrlin 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
Changed
Checklist