Commit Graph

15 Commits

Author SHA1 Message Date
Philip Gai
8d10c36b44 feat: add --batch-size flag to push refs in batches (#173)
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
licenses check / licensed check (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
Close inactive issues / close-issues (push) Has been cancelled
* feat: add --batch-size flag to push refs in batches

Add support for pushing refs in smaller batches to avoid server-side
limits and timeouts when syncing large repositories with many tags/branches.

- Add --batch-size flag (default 0 = no batching, original behavior)
- Add References() method to GitRepository interface
- Implement collectRefs() and pushRefsInBatches() helpers
- Add MinBatchSize validation (must be 0 or >= 10)

This addresses issues where repositories with 1000+ refs fail to sync
to GHES with 'command error on refs/heads/<branch>: failed' errors.

* test: add tests for batch-size flag and push batching functionality

* fix: pin tool dependencies to versions compatible with Go 1.21

* ci: fix docker compose v2 syntax and update setup-ruby action

* refactor: address PR review feedback

- Remove unused RefInfo struct from git.go
- Remove redundant pushedAny variable tracking in pushRefsInBatches
- Remove incomplete TestPushRefsInBatches_PartialUpToDate test (already covered by existing test case)

* docs: add --batch-size flag to README
2026-01-27 15:19:55 -06:00
Shawn Hartsell
dc02275ad7 fixing typo 2024-04-23 11:21:44 -05:00
Shawn Hartsell
e6d6bca5cc simplifying goreleaser config. explicitly set CGO_ENABLED=0 2024-04-23 11:05:23 -05:00
Shawn Hartsell
ea5bded901 refactoring test script to use ps instead of lsof when checking for git daemon 2024-04-05 13:03:43 -05:00
Shawn Hartsell
09d0eed117 checking that the git daemons are set up before running integration tests 2024-04-05 12:51:58 -05:00
Shawn Hartsell
23ff827d24 formatting test-build 2024-04-05 12:50:29 -05:00
Shawn Hartsell
2b1548bf54 upgrading version of golangci-lint to latest in script/bootstrap 2024-01-16 15:16:40 -06:00
Florian Wagner
8decd6ca07 add sanity testing workflow and docs
Signed-off-by: Florian Wagner <h2floh@github.com>
2022-11-22 08:18:05 +00:00
Florian Wagner
51dff542d6 add e2e test for impersonations and visibility
Signed-off-by: Florian Wagner <h2floh@github.com>
2022-11-04 04:44:35 +00:00
Florian Wagner
a824e38f4f fix bootstrap and lint script
Signed-off-by: GitHub <noreply@github.com>
2022-04-25 04:27:33 +00:00
Chris Sidi
d39e48f007 Create org if necessary 2020-09-22 13:57:42 -04:00
Chris Sidi
b5e5d3423b Add tests 2020-09-21 12:08:01 -04:00
Anthony Sterling
71a43cffca update test docs to refer to main 2020-07-14 12:28:33 +01:00
Anthony Sterling
735b1d3c28 rename master to main in build tests 2020-07-14 12:27:39 +01:00
Anthony Sterling
f7954c5ebf Rename project to actions-sync 2020-07-02 19:36:10 +01:00