Something went wrong. Try again.
archive of tangled.org/core repository used for seeding localinfra. tangled.org/tangled.org/core
Something went wrong. Try again.
547 B · 17 lines
Go
123456789101112131415161718package xrpc
import ( "fmt" "testing"
"github.com/alecthomas/assert/v2" "github.com/bluesky-social/indigo/atproto/syntax")
func TestEscapeGitRef(t *testing.T) { recordDID := syntax.DID("did:plc:alice") record := syntax.ATURI("at://did:plc:alice/sh.tangled.repo.pull/something") commitID := "what" refName := EscapeGitRef(fmt.Sprintf("refs/tngl/keep/%s/%s/%s/%s", recordDID.String(), record.Collection(), record.RecordKey(), commitID)) assert.Equal(t, "refs/tngl/keep/did%3aplc%3aalice/sh.tangled.repo.pull/something/what", refName)}