feat(actions): List workflows that were executed once but got removed from the default branch (#37835)

This commit is contained in:
Nicolas
2026-05-25 14:41:36 +00:00
committed by GitHub
parent 2775158024
commit d93bbcc0a6
12 changed files with 138 additions and 30 deletions
+24
View File
@@ -0,0 +1,24 @@
// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package actions
import (
"testing"
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
)
func TestGetRunWorkflowIDs(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
ids, err := GetRunWorkflowIDs(t.Context(), 4)
assert.NoError(t, err)
assert.Equal(t, []string{"artifact.yaml", "test.yaml"}, ids)
ids, err = GetRunWorkflowIDs(t.Context(), 999999)
assert.NoError(t, err)
assert.Empty(t, ids)
}