validateDateFormat checks that a date string is in YYYY-MM-DD format.
(value, fieldName string)
| 1245 | |
| 1246 | // validateDateFormat checks that a date string is in YYYY-MM-DD format. |
| 1247 | func 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. |
| 1255 | func createProjectStatusUpdate(ctx context.Context, gqlClient *githubv4.Client, owner, ownerType string, projectNumber int, body, status, startDate, targetDate string) (*mcp.CallToolResult, any, error) { |
no outgoing calls
no test coverage detected