mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-05-23 08:01:19 -05:00
[PR #207] [CLOSED] Force push protection via backup branches #2094
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/207
Author: @Xyndra
Created: 3/2/2026
Status: ❌ Closed
Base:
main← Head:force-push-protection📝 Commits (10+)
5b7e81bfeat: add force-push protection with backup-branch and block modes (#190)133e832fix: protect deleted branches and default to backup-branch mode6f7eb52fix: respect GH_API_URL/GITHUB_API_URL in listGitHubBranches for E2E compatibilityfdb5020test: add comprehensive E2E tests for backup-branch force-push protection485424eAdd debug since branch backup failed29cba1dAdd logging to debug backup branch creation and sync-repo 404s7d94463Fix myProjectId being empty on test retries by adding ensureMyProjectId helpera1ca759Add more detailed logging for backup branch creation troubleshooting90aa118Increase activity log details truncation limit to see full error messages3647142try to use a backup-org📊 Changes
17 files changed (+4210 additions, -618 deletions)
View changed files
📝
.github/workflows/e2e-tests.yml(+23 -0)📝
src/components/config/GiteaConfigForm.tsx(+105 -31)📝
src/lib/db/schema.ts(+511 -411)➕
src/lib/force-push-detection.test.ts(+352 -0)➕
src/lib/force-push-detection.ts(+681 -0)➕
src/lib/fork-backup.ts(+536 -0)📝
src/lib/gitea-enhanced.ts(+235 -110)📝
src/lib/utils/config-defaults.ts(+33 -14)📝
src/lib/utils/config-mapper.ts(+67 -35)➕
src/pages/api/job/approve-sync.ts(+196 -0)📝
src/pages/api/job/sync-repo.ts(+4 -0)📝
src/types/Repository.ts(+2 -1)📝
src/types/config.ts(+4 -2)➕
tests/e2e/06-backup-branch.spec.ts(+1296 -0)📝
tests/e2e/fake-github-server.ts(+72 -0)📝
tests/e2e/helpers.ts(+92 -14)📝
tests/e2e/playwright.config.ts(+1 -0)📄 Description
No description provided
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.