#30 Add help for more commands
Merged 6 years ago by ralph. Opened 6 years ago by lsedlar.
lsedlar/pag help-text  into  develop

file modified
+4
@@ -11,6 +11,10 @@ 

  @click.argument('name')

  @click.option('--anonymous', '-a', is_flag=True)

  def clone(name, anonymous):

+     """

+     Clone an existing repo. Use the '-a' option when you don't have commit

+     access to the repository.

+     """

      use_ssh = False if anonymous else True

      url = repo_url(name, ssh=use_ssh, git=True)

      run(['git', 'clone', url, name.split('/')[-1]])

file modified
+4
@@ -18,6 +18,10 @@ 

  @click.confirmation_option(prompt="Are you sure you want to create a new repo?")

  @configured

  def create(conf, name, description):

+     """

+     Create a new repo. When run in an existing local git repository, this

+     command will also set up remotes.

+     """

  

      click.echo("Trying to create %r in pagure.io" % name)

      if not client.is_logged_in:

file modified
+9 -1
@@ -35,10 +35,18 @@ 

  

  @app.command('pull-request')

  @assert_local_repo

- @click.option('-b', '--base')

+ @click.option('-b', '--base', help='Branch to merge the changes in')

  @click.option('-h', '--head')

  @configured

  def pullrequest(conf, base, head):

+     """

+     Open a new pull request. Default behaviour is to open pull request from

+     current branch to default upstream branch (usually 'master' or 'develop').

+ 

+     The '--head' option can be used to specify other branch than the current

+     one. You can open a pull request from a fork using

+     'YOUR_USERNAME:BRANCH_NAME' as argument to '--head'.

+     """

  

      name = in_git_repo()

  

file modified
+5
@@ -14,11 +14,16 @@ 

  @app.group()

  @assert_local_repo

  def remote():

+     """Create remote for another fork."""

      pass

  

  @remote.command()

  @click.argument('name')

  def add(name):

+     """

+     Given a username of owner of a fork of this repo, create a remote pointing

+     to that fork.

+     """

      repo = in_git_repo()

      url = repo_url(name + '/' + repo)

      response = requests.head(url)

file modified
+1
@@ -18,6 +18,7 @@ 

  @configured

  @assert_local_repo

  def upload(conf, tarball):

+     """Upload new file to releases."""

      name = in_git_repo()

      click.echo('Trying to upload %r' % tarball)

      if not client.is_logged_in:

In some cases it's not really clear what the command does or how to use it.

rebased onto 2772be4

6 years ago

Pull-Request has been merged by ralph

6 years ago