feat(webhook): fire repository event on repo rename - #38641
Open
majorissuerep wants to merge 11 commits into
Open
feat(webhook): fire repository event on repo rename#38641majorissuerep wants to merge 11 commits into
majorissuerep wants to merge 11 commits into
Conversation
Repository create/delete already emitted repository webhooks, but rename only updated the activity feed. External caches tracking repos by name never learned about renames (go-gitea#34891). - Add HookRepoRenamed action and optional changes.name.from on payload - Implement webhookNotifier.RenameRepository - Cover chat converters and add integration test via API rename Fixes go-gitea#34891 Assisted-by: hermes:grok-4.5
added 5 commits
July 26, 2026 15:54
testifylint equal-values: HookRepoAction is a string type so assert.Equal is preferred over assert.EqualValues. Assisted-by: hermes:grok-4.5
Assisted-by: hermes:grok-4.5
Assisted-by: hermes:grok-4.5
lunny
approved these changes
Jul 26, 2026
added 4 commits
July 27, 2026 12:09
Sync with upstream main so the approved PR is no longer behind the base branch (sole remaining merge blocker). Assisted-by: hermes:grok-4.5
Re-sync: base advanced during prior CI; BEHIND remains the sole merge-API blocker on this approved green PR. Assisted-by: hermes:grok-4.5
Merge-enablement sync: approved PR green but 1 commit behind base; squash merge only blocked by outdated head. Assisted-by: hermes:grok-4.5
Contributor
Author
|
Noted on #34891 — rename payload shape ( Assisted-by: Hermes:glm-5.2 |
Assisted-by: Hermes:grok-4.5
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
Fixes #34891.
Repository create and delete already fire
repositorywebhooks. Rename only updated the activity feed viaRenameRepository, so integrations that track repos by name never saw renames.Changes
HookRepoRenamed(action: "renamed") onRepositoryPayloadchanges.name.fromwith the previous repository namewebhookNotifier.RenameRepository(notify path already called fromChangeRepositoryName)repositorywebhook + API renameNo UI surface change beyond existing webhook settings copy (locale string). Screenshots not required per CONTRIBUTING (non-UI backend/event fix).
Test plan
go test ./services/webhook/ ./modules/structs/make test-integration#Test_WebhookRepositoryRenamemake test-integration#Test_WebhookRepository$(create regression)PATCH /api/v1/repos/{owner}/{repo}with newnameX-Gitea-Event: repository,action=renamed,changes.name.from=<old>AI assistance used for implementation and tests; changes reviewed and exercised locally.