So all code that directly uses gh, or depends only on API calls to GitHub via gh and other means, should be in ./src/lib/github folder. Also inside that folder we should use traditional index.js and other naming, without .lib.js.
That is required to later simplify reimplementing the same logic for glab tool and GitLab API. Also it will be useful to support GitHub Application/Bot mode, where instead of API calls via gh tool we will do direct calls to API using token and oktokit. But the scope of this issue is carefully move existing logic, so it is clearly grouped in github folder.
So all code that directly uses
gh, or depends only on API calls to GitHub via gh and other means, should be in./src/lib/githubfolder. Also inside that folder we should use traditional index.js and other naming, without.lib.js.That is required to later simplify reimplementing the same logic for
glabtool and GitLab API. Also it will be useful to support GitHub Application/Bot mode, where instead of API calls viaghtool we will do direct calls to API using token and oktokit. But the scope of this issue is carefully move existing logic, so it is clearly grouped ingithubfolder.