{"record":{"id":"4a706cfa94c9f53e","repo":"AlistGo/alist","slug":"author-name-is-required","errorCode":null,"errorMessage":"author name is required","messagePattern":"author name is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/github/driver.go","lineNumber":60,"sourceCode":"}\n\nfunc (d *Github) GetAddition() driver.Additional {\n\treturn &d.Addition\n}\n\nfunc (d *Github) Init(ctx context.Context) error {\n\td.RootFolderPath = utils.FixAndCleanPath(d.RootFolderPath)\n\tif d.CommitterName != \"\" && d.CommitterEmail == \"\" {\n\t\treturn errors.New(\"committer email is required\")\n\t}\n\tif d.CommitterName == \"\" && d.CommitterEmail != \"\" {\n\t\treturn errors.New(\"committer name is required\")\n\t}\n\tif d.AuthorName != \"\" && d.AuthorEmail == \"\" {\n\t\treturn errors.New(\"author email is required\")\n\t}\n\tif d.AuthorName == \"\" && d.AuthorEmail != \"\" {\n\t\treturn errors.New(\"author name is required\")\n\t}\n\tvar err error\n\td.mkdirMsgTmpl, err = template.New(\"mkdirCommitMsgTemplate\").Parse(d.MkdirCommitMsg)\n\tif err != nil {\n\t\treturn err\n\t}\n\td.deleteMsgTmpl, err = template.New(\"deleteCommitMsgTemplate\").Parse(d.DeleteCommitMsg)\n\tif err != nil {\n\t\treturn err\n\t}\n\td.putMsgTmpl, err = template.New(\"putCommitMsgTemplate\").Parse(d.PutCommitMsg)\n\tif err != nil {\n\t\treturn err\n\t}\n\td.renameMsgTmpl, err = template.New(\"renameCommitMsgTemplate\").Parse(d.RenameCommitMsg)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/github/driver.go#L42-L78","documentation":"Init fails because AuthorEmail is set while AuthorName is empty — the author identity pair is incomplete in the other direction. Checked at drivers/github/driver.go:60, the last of the four pairing checks before commit-message templates are parsed.","triggerScenarios":"Storage configuration where author_email is filled and author_name is blank.","commonSituations":"Browser auto-fill or copy-paste populating only the email field of the author override.","solutions":["Set author_name to complete the pair.","Or clear author_email to disable the author override.","Re-save the storage configuration."],"exampleFix":"// before\nAuthorName: \"\"\nAuthorEmail: \"bob@example.com\"\n\n// after\nAuthorName: \"bob\"\nAuthorEmail: \"bob@example.com\"","handlingStrategy":"validation","validationCode":"if cfg.AuthorEmail != \"\" && strings.TrimSpace(cfg.AuthorName) == \"\" {\n    return errors.New(\"author name is required when author email is set\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the author pair together with the committer pair.","Prefer leaving the author override empty to reuse the committer identity.","Check both halves after pasting config values."],"tags":["github","config","validation","author","go"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}