commit API uses action SHA as string (#1217)

ritik/code-1773
Marko Gacesa 2024-04-15 14:03:39 +00:00 committed by Harness
parent 9b561a33cd
commit 9414262618
1 changed files with 11 additions and 0 deletions

View File

@ -23,6 +23,8 @@ import (
"strings"
"github.com/harness/gitness/errors"
"github.com/swaggest/jsonschema-go"
)
// EmptyTree is the SHA of an empty tree.
@ -118,3 +120,12 @@ func Must(value string) SHA {
}
return sha
}
func (s SHA) JSONSchema() (jsonschema.Schema, error) {
var schema jsonschema.Schema
schema.AddType(jsonschema.String)
schema.WithDescription("Git object hash")
return schema, nil
}