📌 Description
internal/github/issues_comments.go (CreateIssueComment, DeleteIssueComment) and internal/github/assignees.go (AddIssueAssignees, RemoveIssueAssignees) drive the issue-application workflow (apply, assign, unassign, withdraw, reject) but have no tests. These are the actions a maintainer triggers from internal/handlers/issue_applications.go.
💡 Why it matters: Incorrect request shapes or unhandled error statuses here corrupt the visible state on contributors' GitHub issues; tests pin the HTTP contract.
🧩 Requirements and context
- Use
httptest.Server to assert request method, path, and JSON body for each call.
- Cover success, 404 (missing issue), and 403 (permission) responses with appropriate error mapping.
- Confirm assignees are sent as the GitHub-expected
{"assignees": [...]} shape.
- Confirm the comment body is sent as
{"body": "..."}.
- No real GitHub network access.
Non-functional requirements
- Must be secure, tested, and documented.
- Should be efficient and easy to review.
🛠️ Suggested execution
1. Fork the repo and create a branch
git checkout -b test/github-comments-assignees
2. Implement changes
- Write/modify the relevant source: small refactor to inject base URL if needed
- Write comprehensive tests:
internal/github/issues_comments_test.go, internal/github/assignees_test.go
- Add documentation: GoDoc on the request shapes
- Include GoDoc comments on error mapping
- Validate security assumptions: token header set, not logged
3. Test and commit
go test ./internal/github/...
- Cover edge cases: 404, 403, empty assignee list, server 500
- Include test output and security notes in the PR description.
Example commit message
test(github): cover issue comment and assignee API calls
✅ Acceptance criteria
🔒 Security notes
Verifies the Authorization header is set and never appears in logs or test output.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
internal/github/issues_comments.go(CreateIssueComment,DeleteIssueComment) andinternal/github/assignees.go(AddIssueAssignees,RemoveIssueAssignees) drive the issue-application workflow (apply, assign, unassign, withdraw, reject) but have no tests. These are the actions a maintainer triggers frominternal/handlers/issue_applications.go.🧩 Requirements and context
httptest.Serverto assert request method, path, and JSON body for each call.{"assignees": [...]}shape.{"body": "..."}.Non-functional requirements
🛠️ Suggested execution
1. Fork the repo and create a branch
2. Implement changes
internal/github/issues_comments_test.go,internal/github/assignees_test.go3. Test and commit
go test ./internal/github/...Example commit message
✅ Acceptance criteria
🔒 Security notes
Verifies the Authorization header is set and never appears in logs or test output.
📋 Guidelines