feat(issues): generate contributor issue drafts from repo policy#462
Merged
JSONbored merged 3 commits intoJun 8, 2026
Merged
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
JSONbored
requested changes
Jun 8, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
@kiannidev this should not merge in its current shape.
A few notes:
- The draft-generation direction matches #119, and the dry-run/default-create guard is the right posture.
- The branch is stacked on the focus-manifest work from #389 and overlaps it across
.gittensory.yml, OpenAPI, route source, and focus-manifest tests. - The generated public issue contract hardcodes Gittensory's own
npm run test:ciand 97% coverage requirements. That is not safe as a generic contributor-issue draft for arbitrary repos. - The focus-manifest GET/PUT surface included here still needs the repo-scoped session access fix before it is safe as a maintainer API.
Required changes:
- Rebase/narrow after the focus-manifest route decision, or remove the duplicated #389 surface from this PR.
- Do not generate repo-specific Gittensory validation requirements unless they come from that repo's configured policy.
- Carry over the repo-scoped session access fix for any repo-scoped route included here.
Validation expected:
- Rerun contributor issue draft tests, focus-manifest route tests if still touched, OpenAPI check, and full validation.
Add a draft-generation service with dry-run by default, duplicate detection via title fingerprints and HTML markers, maintainer API route, and audit-logged optional GitHub create when create is explicit and dryRun is false.
Narrow branch to issue JSONbored#119 only, derive testing requirements from manifest policy, and enforce repo-scoped session access on draft generation routes.
ece0349 to
76b9126
Compare
Contributor
Author
|
@JSONbored Thanks for the detailed review — addressed all three blockers. Scope / #389 overlap
Policy-driven validation text
Repo-scoped session access
Validation
Focus-manifest authorization remains in #389. Ready for another look. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
JSONbored
approved these changes
Jun 8, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
@kiannidev this is ready from my side now.
A few notes:
- The previous blockers are addressed: this branch is no longer carrying the #389 focus-manifest surface, validation text is policy-driven instead of hardcoded to Gittensory's local gates, and the route now has repo-scoped session access tests.
- The dry-run default, explicit-create guard, duplicate detection, public text hygiene checks, and audit behavior all fit #119.
- The API/OpenAPI/test coverage is focused enough for this scope.
No code changes requested.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #119
Summary
POST /v1/repos/{owner}/{repo}/contributor-issue-drafts/generatewith dry-run as the default, duplicate detection via HTML marker + normalized title, and optional explicit GitHub create with audit logging.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally; global coverage stays at or above 97% for lines, statements, functions, and branches (aim for 98%+ branch coverage locally so CI variance does not fail near the threshold)npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable — this PR is backend/API/OpenAPI only. No visible UI, frontend, docs, or extension changes.
Notes
GITTENSORY_CONTRIBUTOR_ISSUE_TOKENfor explicit create; falls back to existing drift/public tokens when unset.create: trueanddryRun: false; malformed JSON returns400 invalid_json; invalid schema returns400 invalid_contributor_issue_draft_request.