Fix mirror bug (#33224)

Fix #33200

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit be4e961240883778c44d9651eaaf9ab8723bbbb0)
This commit is contained in:
Lunny Xiao 2025-01-12 02:46:37 -08:00 committed by Earl Warren
parent d68e0d3e39
commit 574ff84967
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 16 additions and 1 deletions

View file

@ -20,6 +20,8 @@ func TestRefName(t *testing.T) {
// Test pull names
assert.Equal(t, "1", RefName("refs/pull/1/head").PullName())
assert.True(t, RefName("refs/pull/1/head").IsPull())
assert.True(t, RefName("refs/pull/1/merge").IsPull())
assert.Equal(t, "my/pull", RefName("refs/pull/my/pull/head").PullName())
// Test for branch names