From 4678b48e0551deeb9f0ff672729f528eda776e8c Mon Sep 17 00:00:00 2001 From: Patrik Polyak Date: Tue, 16 Sep 2025 09:34:25 +0200 Subject: [PATCH] Fix push batches to 25 refspecs at once https://github.com/github/codeql-action-sync-tool/pull/129 introduced this logic, however it created batches of 100 refspecs with overlaps between the pushes (0-100, 25-125 etc.) causing unnecessary duplication of work. --- internal/push/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/push.go b/internal/push/push.go index 2851b89..36038e5 100644 --- a/internal/push/push.go +++ b/internal/push/push.go @@ -166,7 +166,7 @@ func (pushService *pushService) createRepository() (*github.Repository, error) { func splitLargeRefSpecs(refSpecs []config.RefSpec) [][]config.RefSpec { splitRefSpecs := [][]config.RefSpec{} for i := 0; i < len(refSpecs); i += 25 { - end := i + 100 + end := i + 25 if end > len(refSpecs) { end = len(refSpecs) }