LearnNewsExamplesServices
Frontmatter
id9039
titleFeat: Support .env token auth for DevRank Services
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 7, 2026, 10:01 PM
updatedAtFeb 7, 2026, 10:06 PM
githubUrlhttps://github.com/neomjs/neo/issues/9039
authortobiu
commentsCount1
parentIssue8930
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 7, 2026, 10:06 PM

Feat: Support .env token auth for DevRank Services

Closed v12.0.0 enhancementai
tobiu
tobiu commented on Feb 7, 2026, 10:01 PM

Update the DevRank GitHub service (apps/devrank/services/GitHub.mjs) to support authentication via environment variables (GH_TOKEN or GITHUB_TOKEN) using dotenv.

This ensures the services can run in environments where the gh CLI is not authenticated or installed, or when the user prefers using an .env file.

Plan:

  1. Initialize dotenv in apps/devrank/services/cli.mjs to load the .env file from the project root.
  2. Modify apps/devrank/services/GitHub.mjs method #getAuthToken to check process.env before attempting the gh CLI fallback.

References:

  • apps/devrank/services/GitHub.mjs
  • apps/devrank/services/cli.mjs
  • package.json (dotenv dependency)
tobiu added the enhancement label on Feb 7, 2026, 10:01 PM
tobiu added the ai label on Feb 7, 2026, 10:01 PM
tobiu added parent issue #8930 on Feb 7, 2026, 10:01 PM
tobiu assigned to @tobiu on Feb 7, 2026, 10:02 PM
tobiu referenced in commit 49b9d02 - "feat: Support .env token auth for DevRank Services (#9039)" on Feb 7, 2026, 10:05 PM
tobiu
tobiu Feb 7, 2026, 10:05 PM

Input from Gemini 3 Pro:

✦ Implemented support for environment variable authentication in DevRank services.

Changes

  1. CLI Initialization: apps/devrank/services/cli.mjs now initializes dotenv (with quiet: true) to load .env files from the project root.
  2. Auth Logic: apps/devrank/services/GitHub.mjs now prioritizes process.env.GH_TOKEN or process.env.GITHUB_TOKEN before falling back to the gh CLI.

Verification

  • Services can now run in environments without gh CLI authentication if a token is provided via .env.
  • gh CLI fallback remains active for local development convenience.

Code committed to dev branch.

tobiu closed this issue on Feb 7, 2026, 10:06 PM