{"record":{"id":"ec79dd8ea2a8883c","repo":"mislav/hub","slug":"aborted-no-revision-could-be-determined-from-s","errorCode":null,"errorMessage":"Aborted: no revision could be determined from '%s'","messagePattern":"Aborted: no revision could be determined from '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"commands/ci_status.go","lineNumber":95,"sourceCode":"\t}\n\treturn -1\n}\n\nfunc ciStatus(cmd *Command, args *Args) {\n\tref := \"HEAD\"\n\tif !args.IsParamsEmpty() {\n\t\tref = args.RemoveParam(0)\n\t}\n\n\tlocalRepo, err := github.LocalRepo()\n\tutils.Check(err)\n\n\tproject, err := localRepo.MainProject()\n\tutils.Check(err)\n\n\tsha, err := git.Ref(ref)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"Aborted: no revision could be determined from '%s'\", ref)\n\t}\n\tutils.Check(err)\n\n\tif args.Noop {\n\t\tui.Printf(\"Would request CI status for %s\\n\", sha)\n\t} else {\n\t\tgh := github.NewClient(project.Host)\n\t\tresponse, err := gh.FetchCIStatus(project, sha)\n\t\tutils.Check(err)\n\n\t\tstate := \"\"\n\t\tif len(response.Statuses) > 0 {\n\t\t\tfor _, status := range response.Statuses {\n\t\t\t\tif checkSeverity(status.State) > checkSeverity(state) {\n\t\t\t\t\tstate = status.State\n\t\t\t\t}\n\t\t\t}\n\t\t}","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/mislav/hub/blob/5c547ed804368763064e51f3990851e267e88edd/commands/ci_status.go#L77-L113","documentation":"`hub ci-status <ref>` resolves the given ref to a SHA via git.Ref(). If git cannot resolve the argument to a revision, hub discards the underlying git error and reports this fatal message instead, since a CI status can only be fetched for a concrete commit. The command aborts via utils.Check.","triggerScenarios":"Running `hub ci-status <bad-ref>` where the ref doesn't exist: misspelled branch/tag, ref not fetched locally yet, abbreviated SHA too short or unknown, or an empty ref argument.","commonSituations":"Checking status of a remote branch before `git fetch`; typos in branch names; referring to a PR number without the right refs; running in a shallow clone or worktree missing the ref.","solutions":["Verify the ref exists locally: `git rev-parse <ref>` — fix typos or use the full branch name.","Fetch first if the ref is remote: `git fetch origin` then retry hub ci-status origin/branch.","Check remote CI status by commit SHA if you only have one: `hub ci-status <sha>`.","Run `git ls-remote origin | grep <name>` to confirm the ref exists on the remote."],"exampleFix":"// before\nhub ci-status feature-tyop   # no such ref\n// after\ngit fetch origin\nhub ci-status origin/feature-typo","handlingStrategy":"validation","validationCode":"ref=\"origin/feature\"\nif ! git rev-parse --verify --quiet \"$ref^{commit}\" >/dev/null; then\n  git fetch origin || exit 1\nfi\nhub ci-status \"$ref\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always `git fetch` before checking CI status of remote branches.","Validate refs with `git rev-parse <ref>` before passing to hub.","Use full branch names or SHAs rather than ambiguous short refs.","Check `git ls-remote origin` when unsure a branch exists."],"tags":["git","ref-resolution","cli"],"backgroundTag":"revision-not-found","analyzedSha":"5c547ed804368763064e51f3990851e267e88edd","analyzedAt":"2026-09-01T03:34:15.525Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}