Modules@robinpath/github

@robinpath/github

0.1.0Public

GitHub module for RobinPath.

@robinpath/github

GitHub module for RobinPath.

Category Functions Auth License

Why use this module?

The github module lets you:

  • Get repository information
  • List repositories for a user or the authenticated user
  • Create a new repository for the authenticated user
  • Delete a repository (requires delete_repo scope)
  • List branches in a repository

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/github

Quick Start

1. Set up credentials

github.setToken "ghp_xxxxxxxxxxxx"

2. Get repository information

github.getRepo "octocat" "Hello-World"

Available Functions

FunctionDescription
github.setTokenStore a GitHub personal access token for authentication
github.getRepoGet repository information
github.listReposList repositories for a user or the authenticated user
github.createRepoCreate a new repository for the authenticated user
github.deleteRepoDelete a repository (requires delete_repo scope)
github.listBranchesList branches in a repository
github.getBranchGet details for a specific branch
github.createBranchCreate a new branch from an existing branch ref
github.listCommitsList commits in a repository
github.getCommitGet a single commit by SHA
github.listIssuesList issues in a repository
github.createIssueCreate a new issue in a repository
github.updateIssueUpdate an existing issue
github.closeIssueClose an issue
github.addIssueCommentAdd a comment to an issue or pull request
github.listIssueCommentsList comments on an issue or pull request
github.listPullRequestsList pull requests in a repository
github.createPullRequestCreate a new pull request
github.mergePullRequestMerge a pull request
github.listReleasesList releases in a repository
github.createReleaseCreate a new release from a tag
github.listWorkflowsList GitHub Actions workflows in a repository
github.triggerWorkflowTrigger a GitHub Actions workflow dispatch event
github.listWorkflowRunsList workflow runs for a repository or specific workflow
github.getUserGet a user profile or the authenticated user
github.searchReposSearch GitHub repositories
github.searchCodeSearch code across GitHub repositories
github.listLabelsList labels in a repository
github.createLabelCreate a new label in a repository
github.addLabelsAdd labels to an issue or pull request
github.listMilestonesList milestones in a repository
github.createMilestoneCreate a new milestone in a repository

Examples

Get repository information

github.getRepo "octocat" "Hello-World"

List repositories for a user or the authenticated user

github.listRepos "octocat"

Create a new repository for the authenticated user

github.createRepo "my-project" {"description": "A new project", "private": true, "autoInit": true}

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/github";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  github.setToken "ghp_xxxxxxxxxxxx"
  github.getRepo "octocat" "Hello-World"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/github
Version0.1.0
LicenseMIT
Unpacked Size10.9 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

devops