Documentation: TaskSpawner GitHub Issues example doesn't explain how repository is determined
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 331
- Forks
- 40
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 70
Description
Problem
The "Auto-fix GitHub issues with TaskSpawner" example in the README shows:
apiVersion: axon.io/v1alpha1
kind: TaskSpawner
metadata:
name: fix-bugs
spec:
when:
githubIssues:
labels: [bug]
state: open
taskTemplate:
workspaceRef:
name: my-workspace
A new user reading this example would reasonably ask: "Which GitHub repository is this watching for issues?"
The answer is non-obvious: the repository is derived from the Workspace's repo URL. This critical connection is documented in the code comments (api/v1alpha1/taskspawner_types.go:39-41) but not in the README.
Why This is Confusing
- The
githubIssuessection has norepofield - The connection to
workspaceRefis not explained - Users might assume they need to configure the repository elsewhere
- The Workspace is shown as a separate resource for cloning code, not for identifying the GitHub repo to poll
Current State
The actual behavior (from the code):
// GitHubIssues discovers issues from a GitHub repository.
// The repository owner and name are derived from the workspace's repo URL
// specified in taskTemplate.workspaceRef.
// If the workspace has a secretRef, it is used for GitHub API authentication.
This means:
- If workspace points to
https://github.com/org/repo.git, TaskSpawner pollsorg/repofor issues - The workspace's GitHub token (if present) is used for API auth
- The workspace serves dual purpose: code checkout AND GitHub API discovery
Impact
Users might:
- Not understand which repo is being watched
- Try to configure the repository in the wrong place
- Miss that the workspace token is used for both git clone and GitHub API access
- Be confused when the TaskSpawner only works for the repo in the workspace
Suggested Fix
Add a clear explanation in the TaskSpawner example:
### Auto-fix GitHub issues with TaskSpawner
Create a TaskSpawner to automatically turn GitHub issues into agent tasks.
**Important:** The GitHub repository to watch is determined by the Workspace's `repo` URL. For example, if `my-workspace` points to `https://github.com/your-org/your-repo.git`, the TaskSpawner will poll issues from `your-org/your-repo`.
```yaml
apiVersion: axon.io/v1alpha1
kind: TaskSpawner
metadata:
name: fix-bugs
spec:
when:
githubIssues: # Polls the repo from my-workspace
labels: [bug]
state: open
taskTemplate:
workspaceRef:
name: my-workspace # Must reference a Workspace with a GitHub repo URL
Or add it to the TaskSpawner reference section:
```markdown
| Field | Description | Required |
|-------|-------------|----------|
| `spec.when.githubIssues` | Discovers issues from the GitHub repository specified in `spec.taskTemplate.workspaceRef`'s Workspace repo URL | No |
Additional Context
Related to issue #170, but this is specifically about the conceptual model of how TaskSpawner determines which repo to watch, not just the prerequisite setup steps.
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.
Research direction
Start with the README's “Auto-fix GitHub issues with TaskSpawner” example and compare it with api/v1alpha1/taskspawner_types.go:39-41. Update the example or TaskSpawner reference to explain that the Workspace repo URL determines the GitHub repository and that its secret may provide authentication. Done means a new user can identify the watched repository from the example alone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, go
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100