docs: add missing @returns tag to main function JSDoc across _tools/github outliers#12320
Closed
Planeshifter wants to merge 4 commits into
Closed
docs: add missing @returns tag to main function JSDoc across _tools/github outliers#12320Planeshifter wants to merge 4 commits into
@returns tag to main function JSDoc across _tools/github outliers#12320Planeshifter wants to merge 4 commits into
Conversation
…thub/create-issue`
Added `@returns {void}` to the public `createIssue` function's JSDoc
block, where it was missing. 19 of 23 sibling packages in
`@stdlib/_tools/github` (83%) already document the void return on
the main function; this brings `create-issue` into conformance.
…thub/dependents`
Added `@returns {void}` to the public `dependents` function's JSDoc
block, where it was missing. 19 of 23 sibling packages in
`@stdlib/_tools/github` (83%) already document the void return on
the main function; the inner `done` callback in this file is also
already annotated `@returns {void}`.
…thub/dependents-count`
Added `@returns {void}` to the public `dependentsCount` function's
JSDoc block, where it was missing. 19 of 23 sibling packages in
`@stdlib/_tools/github` (83%) already document the void return on
the main function; the inner `done` callback in this file is also
already annotated `@returns {void}`.
…thub/dispatch-workflow`
Added `@returns {void}` to the public `dispatch` function's JSDoc
block, where it was missing. 19 of 23 sibling packages in
`@stdlib/_tools/github` (83%) already document the void return on
the main function; this brings `dispatch-workflow` into conformance.
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.
Description
Adds the missing
* @returns {void}JSDoc tag to the public main function in four@stdlib/_tools/githubpackages. Nineteen of twenty-three sibling packages in the namespace (83%) already carry this tag on the main function; this brings the four outliers into conformance with no behavior change.Namespace summary
@stdlib/_tools/githubpackage.jsontop-level keys,scripts,stdlibkeys, README section list,manifest.jsonkeys,test/benchmark/examples/file naminglib/main.js,lib/index.js,lib/validate.js): public signature, validation prologue, error-construction kind, JSDoc shape, dependenciespackage.jsontop-level key set (100%),scriptsshape (100% empty),manifest.jsonabsence (100%), error-construction kind (100%format), core file set —README.md,bin/cli,docs/usage.txt,etc/cli_opts.json,examples/index.js,lib/index.js,lib/main.js,package.json(100%),lib/validate.js(96%),lib/defaults.json(91%),test/test.{cli,main,js,validate}.js(87–91%), README## Usage/## Examples/## CLI(100%),@returns {void}on main function JSDoc (83%)@examplepresence in main JSDoc (26%),@throwspresence in main JSDoc (30%),lib/factory.jspresence (74%),## NotesREADME heading (78%, borderline — flagged but not corrected because adding notes requires package-specific content)dependentsanddependents-count(notest/directory at all);fetch-file(missinglib/validate.jsand several test fixtures);user-rate-limit(missingtest/fixtures/info.json, but its existing tests do not reference the fixture)Per-outlier corrections
_tools/github/create-issuePublic
createIssue( slug, title, options, clbk )is a callback-style async function with no synchronous return value. The JSDoc block listed five@throwstags and an@examplebut no@returns. Added* @returns {void}between the last@throwsand the blank*line preceding@example, matching the position used in sibling packages (e.g.create-repo,create-token,dispatch-workflowpost-fix)._tools/github/dependentsPublic
dependents( slug, options, clbk )is a callback-style async function that delegates toresolve( opts, done ). The innerdonecallback was already annotated@returns {void}; the outer function was not. Added* @returns {void}to the outer JSDoc block. README's "Returns the list of dependents …" is prose describing callback delivery, not a synchronous return value._tools/github/dependents-countSame shape as
dependents: publicdependentsCount( slug, options, clbk )is callback-style, terminates withresolve( opts, done ), and the innerdonecallback already carries@returns {void}while the outer function did not. Added* @returns {void}to the outer JSDoc block. README's "Returns the number of dependents …" is prose describing callback delivery._tools/github/dispatch-workflowPublic
dispatch( slug, id, options, clbk )is a callback-style async function structurally identical tocreate-issueandcreate-repo. The JSDoc listed five@throwsand an@examplebut no@returns. Added* @returns {void}between the last@throwsand the blank*line preceding@example.Related Issues
No.
Questions
No.
Other
Validation
package.jsonshape, README section, manifest, andtest//benchmark//examples/file inventories per package.@returnstag on the public main function is present in 19 packages (create-repo,create-token,delete-token,fetch-file,followers,following,get,org-repos,rank-followers,rank-users,set-topics,star-repo,starred,subscriptions,user-details,user-orgs,user-rate-limit,user-repos,workflow-runs) and absent in the four outliers fixed here.var x = createIssue(...)-style invocations do not exist), nodocs/types/index.d.tsdeclarations contradict{void}, and READMEs describe callback delivery rather than synchronous returns._toolsandblas/base/ndarraysiblings #12287 touches_tools/github/create-issueand_tools/github/dispatch-workflowfor a@throws {TypeError}→@throws {Error}annotation inlib/validate.jsonly; no overlap withlib/main.jsJSDoc.Deliberately excluded
## NotesREADME heading drift (5 outliers) — adding a Notes section requires package-specific prose; not a mechanical fix.lib/validate.jsinfetch-file— would require domain-specific validation logic; not mechanical.test/directory independentsanddependents-count— adding test files requires real test logic, not boilerplate; cascading scope.test/fixtures/info.jsoninuser-rate-limit— its existing tests do not reference this fixture, so adding it would be dead code.lib/defaults.jsonandtest/fixtures/opts.jscontent drift — these files vary per package by design (differentuseragent,pathname,method, option shapes); not a single canonical pattern to normalize toward.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of the automated cross-package drift detection routine. Per-package structural and semantic feature extraction, majority-vote drift identification, and two independent validation agents (semantic review and cross-reference) confirmed each outlier before the patch was applied. A maintainer should review classification and contents before promoting this draft.
@stdlib-js/reviewers
Generated by Claude Code