MCPcopy Index your code
hub / github.com/github/github-mcp-server / validateDateFormat

Function validateDateFormat

pkg/github/projects.go:1247–1252  ·  view source on GitHub ↗

validateDateFormat checks that a date string is in YYYY-MM-DD format.

(value, fieldName string)

Source from the content-addressed store, hash-verified

1245
1246// validateDateFormat checks that a date string is in YYYY-MM-DD format.
1247func validateDateFormat(value, fieldName string) error {
1248 if _, err := time.Parse("2006-01-02", value); err != nil {
1249 return fmt.Errorf("invalid %s %q: must be YYYY-MM-DD format", fieldName, value)
1250 }
1251 return nil
1252}
1253
1254// createProjectStatusUpdate creates a new status update for a project via GraphQL.
1255func createProjectStatusUpdate(ctx context.Context, gqlClient *githubv4.Client, owner, ownerType string, projectNumber int, body, status, startDate, targetDate string) (*mcp.CallToolResult, any, error) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected