{"record":{"id":"bc13832e167fdc2d","repo":"gastownhall/beads","slug":"no-ado-project-configured-set-via-bd-config-set-a","errorCode":null,"errorMessage":"no ADO project configured\nSet via 'bd config set ado.project <project>'\nOr:  'bd config set ado.projects \"proj1,proj2\"'\nOr: AZURE_DEVOPS_PROJECT env var","messagePattern":"no ADO project configured\nSet via 'bd config set ado\\.project <project>'\nOr:  'bd config set ado\\.projects \"proj1,proj2\"'\nOr: AZURE_DEVOPS_PROJECT env var","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/ado.go","lineNumber":249,"sourceCode":"\tcase \"ado.projects\":\n\t\treturn \"AZURE_DEVOPS_PROJECTS\"\n\tcase \"ado.url\":\n\t\treturn \"AZURE_DEVOPS_URL\"\n\tdefault:\n\t\treturn \"\"\n\t}\n}\n\n// validateADOConfig checks that required configuration is present.\nfunc validateADOConfig(cfg ADOConfig) error {\n\tif cfg.PAT == \"\" {\n\t\treturn fmt.Errorf(\"ado.pat not configured: set via 'bd config set ado.pat <token>' or AZURE_DEVOPS_PAT env var\")\n\t}\n\tif cfg.Org == \"\" && cfg.URL == \"\" {\n\t\treturn fmt.Errorf(\"ado.org not configured: set via 'bd config set ado.org <org>' or AZURE_DEVOPS_ORG env var\")\n\t}\n\tif len(cfg.Projects) == 0 {\n\t\treturn fmt.Errorf(\"no ADO project configured\\nSet via 'bd config set ado.project <project>'\\nOr:  'bd config set ado.projects \\\"proj1,proj2\\\"'\\nOr: AZURE_DEVOPS_PROJECT env var\")\n\t}\n\treturn nil\n}\n\n// maskADOToken masks a token for safe display.\n// Shows only the first 4 characters to aid identification without\n// revealing enough to reduce brute-force entropy.\nfunc maskADOToken(token string) string {\n\tif token == \"\" {\n\t\treturn \"(not set)\"\n\t}\n\tif len(token) <= 4 {\n\t\treturn \"****\"\n\t}\n\treturn token[:4] + \"****\"\n}\n\n// getADOClient creates an Azure DevOps client from the current configuration.","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/ado.go#L231-L267","documentation":"validateADOConfig requires at least one configured Azure DevOps project. When cfg.Projects is empty, this multi-line error lists all three supported setup channels: the single-project key, the comma-separated projects key, or the AZURE_DEVOPS_PROJECT env var.","triggerScenarios":"Running an ADO command through validateADOConfig (status, sync, push, pull) with no ado.project/ado.projects entry in bd config and no AZURE_DEVOPS_PROJECT env var.","commonSituations":"Org and PAT configured but projects step skipped; teams migrating from single-project to multi-project setups unsure which key to use; CI images without the project env var.","solutions":["Run `bd config set ado.project <project>` for a single project","Run `bd config set ado.projects \"proj1,proj2\"` for multiple projects","Export AZURE_DEVOPS_PROJECT=<project> in the shell/CI environment"],"exampleFix":"// before\nbd ado sync\n// error: no ADO project configured\n// after\nbd config set ado.projects \"platform,web\" && bd ado sync","handlingStrategy":"validation","validationCode":"if os.Getenv(\"AZURE_DEVOPS_PROJECT\") == \"\" {\n    if projects, _ := config.Get(\"ado.projects\"); projects == \"\" {\n        if p, _ := config.Get(\"ado.project\"); p == \"\" {\n            return errors.New(\"configure ado.project(s) or AZURE_DEVOPS_PROJECT before ADO commands\")\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := bdAdoSync(); err != nil && strings.Contains(err.Error(), \"no ADO project configured\") {\n    return configureProjectsThenRetry()\n}","preventionTips":["Configure projects immediately after PAT/org during setup","Use ado.projects for multi-project teams","Export AZURE_DEVOPS_PROJECT in CI"],"tags":["azure-devops","missing-config","project","ado"],"backgroundTag":"missing-env-var","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}