Skip to content

feature request: allow usage with private repos #14

@da1z

Description

@da1z

hey. i would like to use it with private repos. would you be willing to accept PR with it?
from what i see and tried locally would be as easy as allow usage for github token when checking for repo existance. then git clone will be handled by ssh key already on my machine.

   const apiUrl = `https://api.github.com/repos/${owner}/${repo}`;
+  const token = process.env.OPENSRC_GITHUB_TOKEN;
 
   const response = await fetch(apiUrl, {
     headers: {
       Accept: "application/vnd.github.v3+json",
       "User-Agent": "opensrc-cli",
+      ...(token ? { Authorization: `Bearer ${token}` } : {}),
     },
   });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions