bug(dtgithub): projectCreator never receives repoOwner, repoName or branch, so every GitHub call targets an empty repo
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in pkg/dtgithub/github_repo_projects_store.go by reading NewRepoProjectsStore, GithubRepoProjectsStore.CreateNewProject, and newProjectCreator. Trace the parsed owner, repository, and branch into projectCreator, then verify the GitHub calls no longer use empty values and that the resulting repository, ref, README title, and errors use those inputs.
Written by the indexing model from the issue text.
Description
What happens
Every GitHub API call projectCreator makes is addressed to an empty owner and an empty repository name, and it always works on the branch "".
Trigger
newProjectCreator populates only two of the six fields (pkg/dtgithub/github_repo_projects_store.go):
func newProjectCreator(ghClient *github.Client, report datatug.StatusReporter) (creator *projectCreator) {
return &projectCreator{
client: ghClient,
report: report,
}
}
repoOwner, repoName, repo and branch are left at their zero values, and nothing assigns them afterwards. Meanwhile GithubRepoProjectsStore.CreateNewProject parses exactly those first two out of its projectID and then throws them away:
repoOwner, repoName, projectDir := ids[0], ids[1], path.Join(ids[2:]...)
_, _, _ = repoOwner, repoName, title
So createRepo calls c.client.Repositories.Get(ctx, "", ""), CreateProject asks for the ref heads/ on ""/"", addDatatugSectionToRootReadmeFile writes # as a README title, and the error messages report failed to create GitHub repository '/'.
branch is a second, separate loss: NewRepoProjectsStore defaults it to "main" and stores it on GithubRepoProjectsStore, but the creator it builds never receives it.
Expected
newProjectCreator should take the owner, repo and branch the store already parsed and hold them, so the parsed values are actually used.
Notes
Found while adapting the CLI to datatug-core v0.39.0's caller-supplied project id (#259) and deliberately not fixed there — it is a pre-existing gap in an unfinished code path, not a consequence of the id change. In practice the panic in the sibling issue fires first, so this is only reachable once that is fixed.
- Dominant language
- Go
- Stars
- 1
- Forks
- 0
- Avg merge
- 1h 56m
- Merged PRs (30d)
- 84
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from datatug/datatug-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
datatug/datatug-cli#263 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
datatug/datatug-cli#256 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 57/100
datatug/datatug-cli#262 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
datatug/datatug-cli#260 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
datatug/datatug-cli#247 ·
All issues in datatug/datatug-cli
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100