Sha256: 84b162907b2a55ec6bd2c199d21f2ea45023258b6001ec551e475f341b769941

Contents?: true

Size: 886 Bytes

Versions: 6

Compression:

Stored size: 886 Bytes

Contents

# encoding: utf-8

module GithubCLI
  class Commands::Collaborators < Command

    namespace :collab

    desc 'list <owner> <repo>', 'Lists collaborators'
    def list(owner, repo)
      Collaborator.all owner, repo, options[:params], options[:format]
    end

    desc 'add <owner> <repo> <user>', 'Add a collaborator'
    def add(owner, repo, user)
      Collaborator.add owner, repo, user, options[:params], options[:format]
    end

    desc 'collab <owner> <repo> <user>', 'Checks if user is a collaborator on a given repo'
    def collab(owner, repo, user)
      Collaborator.collaborator? owner, repo, user, options[:params], options[:format]
    end

    desc 'remove <owner> <repo> <user>', 'Remove a collaborator'
    def remove(owner, repo, user)
      Collaborator.remove owner, repo, user, options[:params], options[:format]
    end

  end # Collaborators
end # GithubCLI

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
github_cli-0.5.9 lib/github_cli/commands/collaborators.rb
github_cli-0.5.8 lib/github_cli/commands/collaborators.rb
github_cli-0.5.7 lib/github_cli/commands/collaborators.rb
github_cli-0.5.6 lib/github_cli/commands/collaborators.rb
github_cli-0.5.5 lib/github_cli/commands/collaborators.rb
github_cli-0.5.4 lib/github_cli/commands/collaborators.rb