Skip to content

senecajs/seneca-github-provider

Repository files navigation

Seneca Github-Provider

Seneca Github-Provider is a plugin for Seneca

Provides access to the Github API using the Seneca provider convention. Github API entities are represented as Seneca entities so that they can be accessed using the Seneca entity API and messages.

npm version build Coverage Status Known Vulnerabilities DeepScan grade Maintainability

Voxgig This open source module is sponsored and supported by Voxgig.

Quick Example

// Setup - get the key value (<SECRET>) separately from a vault or
// environment variable.
Seneca()
  .use('provider', {
    provider: {
      github: {
        keys: {
          api: {
            value: '<SECRET>'
          },
        }
      }
    }
  })
  .use('github-provider')

let repo = await seneca.entity('provider/github/repo')
  .load$('senecajs/github-api-test')

Console.log('REPO DATA', repo)

repo.description = 'New description'
repo = await repo.save$()

Console.log('UPDATED DATA', repo)

Install

$ npm install @seneca/github-provider

Options

  • debug : boolean false

Set plugin options when loading with:

seneca.use('GithubProvider', { name: value, ... })

Note: foo.bar in the list above means { foo: { bar: ... } }

Action Patterns

Action Descriptions

« role:entity,base:github,cmd:load,name:repo,zone:provider »

Load GitHub repository data into an entity.


« role:entity,base:github,cmd:save,name:repo,zone:provider »

Update GitHub repository data from an entity.


« sys:provider,get:info,provider:github »

Get information about the provider.


About

Seneca plugin that provides access to the GitHub API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published