コード例 #1
0
 def handle_pull_request(self, ctx, name, target_filename, packages_str,
                         tools_str, base_image, **kwds):
     if self.do_pull_request:
         message = kwds["message"]
         message = string.Template(message).safe_substitute({
             "hash":
             name,
             "packages":
             packages_str,
             "tools":
             tools_str,
             "base_image":
             base_image,
         })
         branch_name = name.replace(":", "-")
         branch(ctx,
                self.target_repository,
                branch_name,
                from_branch="master")
         add(ctx, self.target_repository, target_filename)
         commit(ctx, self.target_repository, message=message)
         force_push = kwds.get("force_push", False)
         push(ctx,
              self.target_repository,
              os.environ.get("GITHUB_USER"),
              branch_name,
              force=force_push)
         pull_request(ctx, self.target_repository, message=message)
コード例 #2
0
 def handle_pull_request(self, ctx, name, target_filename, **kwds):
     if self.do_pull_request:
         message = kwds["message"] % name
         branch_name = name
         branch(ctx, self.target_repository, branch_name, from_branch="master")
         add(ctx, self.target_repository, target_filename)
         commit(ctx, self.target_repository, message=message)
         force_push = kwds.get("force_push", False)
         push(ctx, self.target_repository, os.environ.get("GITHUB_USER"), branch_name, force=force_push)
         pull_request(ctx, self.target_repository, message=message)
コード例 #3
0
 def handle_pull_request(self, ctx, name, target_filename, packages_str, tools_str, **kwds):
     if self.do_pull_request:
         message = kwds["message"]
         message = string.Template(message).safe_substitute({
             "hash": name,
             "packages": packages_str,
             "tools": tools_str,
         })
         branch_name = name.replace(":", "-")
         branch(ctx, self.target_repository, branch_name, from_branch="master")
         add(ctx, self.target_repository, target_filename)
         commit(ctx, self.target_repository, message=message)
         force_push = kwds.get("force_push", False)
         push(ctx, self.target_repository, os.environ.get("GITHUB_USER"), branch_name, force=force_push)
         pull_request(ctx, self.target_repository, message=message)
コード例 #4
0
def cli(ctx, path, message=None, **kwds):
    """Short-cut to quickly create a pull request for a relevant Github repo.

    For instance, the following will clone, fork, and branch the tools-iuc
    repository to allow a subsequent pull request to fix a problem with bwa.

    \b
        $ planemo clone --branch bwa-fix tools-iuc
        $ cd tools-iuc
        $ # Make changes.
        $ git add -p # Add desired changes.
        $ git commit -m "Fix bwa problem."
        $ planemo pull_request -m "Fix bwa problem."

    These changes do require that a github username and password are
    specified in ~/.planemo.yml.
    """
    github_util.pull_request(ctx, path, message=message, **kwds)
コード例 #5
0
def cli(ctx, path, message=None, **kwds):
    """Short-cut to quickly create a pull request for a relevant Github repo.

    For instance, the following will clone, fork, and branch the tools-iuc
    repository to allow a subsequent pull request to fix a problem with bwa.

    \b
        $ planemo clone --branch bwa-fix tools-iuc
        $ cd tools-iuc
        $ # Make changes.
        $ git add -p # Add desired changes.
        $ git commit -m "Fix bwa problem."
        $ planemo pull_request -m "Fix bwa problem."

    These changes do require that a github access token is
    specified in ~/.planemo.yml. An access token can be generated by going
    to https://github.com/settings/tokens.
    """
    github_util.pull_request(ctx, path, message=message, **kwds)