一个处理大量分页请求的库。

mass-pagure-prs的Python项目详细描述


此库提供了在 Fedora包的规范文件和创建分页请求 为了他们

示例用法

frommass_pagure_prsimportBasePRsGeneratorclassPagurePRsGenerator(BasePRsGenerator):defmodify_spec(self,specfile):"""Modify a spec file and return a modified version.

        Args:
            specfile (str): A spec file as a string.

        Return:
            (str) A modified spec file.
        """# Do things with a spec file and return a# modified spec file as a string.defcheck_mock_build_results(self,output):"""Given the output of the mock build check the result."""# Optional, can be skipped. Enables checking mock build# results/logs/created rpms if mock build is ran for packages.defcheck_koji_scratch_build_results(self,output):"""Given the output of the Koji scratch build check the result."""# Optional, can be skipped. Enables checking Koji scratch build# results if Koji scratch build is ran for packages.defmain():prs_generator=PagurePRsGenerator(packages_filename='packages.txt',output_dirname='/tmp/pagure_prs',dry_run=False,pagure_token='pagure_token',pagure_user='pagure_user',fas_user='fas_user',# will not be needed with Pagure 4.0.0fas_password='fas_password',# will not be needed with Pagure 4.0.0)# Set branch name and texts for commit messages, PR description etc.prs_generator.configure(git_branch='sample_branch',changelog_entry='sample message',commit_message='sample message',pr_title='sample message',pr_description='sample message')# Open PRs.# Receive the list of links to opened PRs if not in dry run.prs=prs_generator.run(do_mock_build=True,do_koji_scratch_build=False)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
ApachePOI如何通过java从excel文件中删除空白列?   linux到后台Java服务应用程序的简单发送/接收接口   java ActionBarPullToRefresh什么都没发生   java从millis获取错误的整数天   java相同的代码在两个不同的包上表现不同   java将每个新的char元素写入一个文件(如果被覆盖)   mysql如何在Java中通过外键链接的多个表中插入数据   java环境下mysql网络文件访问   java当使用构建器模式时,为什么我不应该重用builderobject来访问对象配置?   java jQueryServlet post异常失败   java应该使用什么逻辑来创建像《愤怒的小鸟》中那样的锁屏   java Android:在不滑动的情况下更改ViewPager中的片段   java在使用我的程序逻辑时获得空输出