Wondering what’s next for npm?Check out our public roadmap! »

    gh-user-org-events

    1.0.0 • Public • Published

    gh-user-org-events

    NPM version Build Status Coverage Status Dependency Status devDependency Status

    Get the list of events related to the specific Github organization performed by a user

    const ghUserOrgEvents = require('gh-user-org-events');
     
    ghUserOrgEvents('shinnn', 'imagemin', orgEvents => console.log(orgEvents));
    [
      {
        id: '3494270483',
        type: 'IssueCommentEvent',
        actor: {login: 'shinnn', ...},
        repo: {id: 19068515, name: 'imagemin/imagemin-pngquant', ...},
        payload: {action: 'created', issue: {...}, ...},
        public: true,
        created_at: '2016-01-05T09:32:57Z',
        org: {
          id: 7868808,
          login: 'imagemin',
          gravatar_id: '',
          url: 'https://api.github.com/orgs/imagemin',
          avatar_url: 'https://avatars.githubusercontent.com/u/7868808?'
        }
      },
      {
        id: '3494270483',
        type: 'IssueCommentEvent',
        actor: {login: 'shinnn', ...},
        repo: {id: 19068515, name: 'imagemin/imagemin-pngquant', ...},
        payload: {action: 'created', issue: {...}, ...},
        public: true,
        created_at: '2016-01-05T09:32:57Z',
        org: {
          id: 7868808,
          login: 'imagemin',
          gravatar_id: '',
          url: 'https://api.github.com/orgs/imagemin',
          avatar_url: 'https://avatars.githubusercontent.com/u/7868808?'
        }
      },
      {
        id: '3494210472',
        type: 'PushEvent',
        actor: {login: 'shinnn', ...},
        repo: {id: 19068515, name: 'imagemin/imagemin-pngquant', ...},
        payload: {push_id: 922716391, size: 1, ...},
        public: true,
        created_at: '2016-01-05T09:11:21Z',
        org: {
          id: 7868808,
          login: 'imagemin',
          gravatar_id: '',
          url: 'https://api.github.com/orgs/imagemin',
          avatar_url: 'https://avatars.githubusercontent.com/u/7868808?'
        }
      },
      // ...
    ]

    Installation

    Use npm.

    npm install gh-user-org-events
    

    API

    const ghUserEvents = require('gh-user-org-events');

    ghUserOrgEvents(user, org [, options])

    user: String (a Github username, for example https://github.com/shinnn'shinnn')
    org: String (a Github organization username, for example https://github.com/nodejs'nodejs')
    options: Object (gh-user-events options)
    Return: Promise instance

    It has almost the same API as gh-user-events's, except that it only gets items related to a specific organization.

    License

    Copyright (c) 2016 Shinnosuke Watanabe

    Licensed under the MIT License.

    Install

    npm i gh-user-org-events

    DownloadsWeekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar