Sha256: dfc9e87e4d76c6eb32ace7a749f0ea5218e40abc7ccfab42b635a91eabb39d44
Contents?: true
Size: 1.69 KB
Versions: 3
Compression:
Stored size: 1.69 KB
Contents
# encoding: utf-8 module GithubCLI class Commands::References < Command namespace :ref desc 'list <user> <repo> <ref>', 'List all References' method_option :ref, :type => :string, :banner => 'branch reference' def list(user, repo) ref = options[:ref] ? options[:ref] : nil Reference.list user, repo, ref, options[:params], options[:format] end desc 'get <user> <repo> <ref>', 'Get a Reference' def get(user, repo, ref) Reference.get user, repo, ref, options[:params], options[:format] end desc 'create <user> <repo>', 'Create a new Reference' long_desc <<-DESC Inputs ref - String of the name of the fully qualified reference (ie: refs/heads/master). If it doesn’t start with ‘refs’ and have at least two slashes, it will be rejected.\n sha - String of the SHA1 value to set this reference to DESC def create(user, repo) Reference.create user, repo, options[:params], options[:format] end desc 'update <user> <repo> <ref>', 'Update a Reference' long_desc <<-DESC Inputs sha - String of the SHA1 value to set this reference to\n force - Boolean indicating whether to force the update or to make sure the update is a fast-forward update. The default is <tt>false</tt>, so leaving this out or setting it to false will make sure you’re not overwriting work. DESC def update(user, repo, ref) Reference.update user, repo, ref, options[:params], options[:format] end desc 'delete <user> <repo> <ref>', 'Delete a Reference' def delete(user, repo, ref) Reference.delete user, repo, ref, options[:params], options[:format] end end # References end # GithubCLI
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
github_cli-0.4.3 | lib/github_cli/commands/references.rb |
github_cli-0.4.2 | lib/github_cli/commands/references.rb |
github_cli-0.4.1 | lib/github_cli/commands/references.rb |