{ "info": { "author": "Joway Wang", "author_email": "joway.w@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6" ], "description": "\n# Repo Watching\n\nGithub repos watching framework\n\n## Install\n\n```shell\npip install watching\n```\n\n## Simple Usage\n\nfunction `ctx.upsert_file_and_pr` is a helper to update or create file and create pull request .\n\n```python\nwatcher = Watcher({\n 'github_access_token': ACCESS_TOKEN,\n})\n\n\ndef license_middleware(ctx: Context):\n branch = 'watcher_license_create'\n path = '/LICENSE'\n new_content = 'MIT\\n\\ncreated by joway'\n message = 'add MIT license'\n pr_title = 'Init: MIT License'\n pr_body = '- create MIT License'\n\n file_branch = 'master'\n\n ctx.upsert_file_and_pr(\n path=path, content=new_content, branch=branch,\n should_upsert=lambda new, old: new != old, message=message,\n pr_title=pr_title, pr_body=pr_body,\n )\n\n\ndef other_middleware(ctx: Context):\n pass\n\n\ndef filter_func(repo: Repo):\n if repo.name == 'repo-watching-demo':\n return True\n\n\n# task chain , it will be executed by every repo\nwatcher.use(license_middleware, other_middleware)\n\n# filter the repos you need\nrepos = watcher.get_all_repos(filter_func=filter_func)\n\n# listen repos\nwatcher.listen(repos)\n\n# traverse all repos you listened\nwatcher.run()\n\n```\n\n## Advanced Usage\n\n```python\n# get commit list\nctx.repo.commit_list()\n\n# access your github username | org name\nctx.repo.login\nctx.repo.name\n\n# create file\nctx.repo.file_create()\n# update file\nctx.repo.file_update()\n# get file\nctx.repo.file_get()\n# create branch\nctx.repo.branch_create()\n# create pr\nctx.repo.pr_create()\n```", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/joway/repo-watching", "keywords": "github repo watching robot framework", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "watching", "package_url": "https://pypi.org/project/watching/", "platform": "", "project_url": "https://pypi.org/project/watching/", "project_urls": { "Homepage": "https://github.com/joway/repo-watching" }, "release_url": "https://pypi.org/project/watching/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "github repo watching client .", "version": "0.0.4" }, "last_serial": 4124752, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "8b007c3cdaf6441cec98bd06334346a8", "sha256": "3e07bdbc6185a79f19d2cf0f7025c53449022960978e13557ae5df3114740569" }, "downloads": -1, "filename": "watching-0.0.1.tar.gz", "has_sig": false, "md5_digest": "8b007c3cdaf6441cec98bd06334346a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2804, "upload_time": "2018-08-01T12:05:52", "url": "https://files.pythonhosted.org/packages/b1/99/4a6b13d536106cc4bb60f0f4fb345ef71dee97d41642fb6589b9bd24f4cf/watching-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "531c2acac0801f181c994308274a0017", "sha256": "bde5499e40e6be6861de00b7e1db1abcb47c93c5652816a742f699eefabc5c23" }, "downloads": -1, "filename": "watching-0.0.2.tar.gz", "has_sig": false, "md5_digest": "531c2acac0801f181c994308274a0017", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3761, "upload_time": "2018-08-01T12:22:38", "url": "https://files.pythonhosted.org/packages/fa/77/946f97a69660a629232ce253fb195ab7b156c0c6465a1557a079825f1f68/watching-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "7c9b9a667f1029fcf59d64755f549950", "sha256": "a222500d1ba0e3c01560f2e2ca26b80ab9cb8e3d0e638da0478def06a2b690b6" }, "downloads": -1, "filename": "watching-0.0.3.tar.gz", "has_sig": false, "md5_digest": "7c9b9a667f1029fcf59d64755f549950", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3766, "upload_time": "2018-08-01T12:41:15", "url": "https://files.pythonhosted.org/packages/a5/c1/bf84d535f97d255fbc24fbb1038c136689fd007571e7d42faa8b305fbd7c/watching-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "bd813e0a6f8fbff5c35930320d57d09d", "sha256": "448e401911838b424b5218bd699bf593c3e5e6ce884380786640c922f2416374" }, "downloads": -1, "filename": "watching-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bd813e0a6f8fbff5c35930320d57d09d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3755, "upload_time": "2018-08-01T13:15:13", "url": "https://files.pythonhosted.org/packages/1e/7a/e3c6fe45a92ac11fac41d76967f9cf350322aa55092a531e46cdc1677d25/watching-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bd813e0a6f8fbff5c35930320d57d09d", "sha256": "448e401911838b424b5218bd699bf593c3e5e6ce884380786640c922f2416374" }, "downloads": -1, "filename": "watching-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bd813e0a6f8fbff5c35930320d57d09d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3755, "upload_time": "2018-08-01T13:15:13", "url": "https://files.pythonhosted.org/packages/1e/7a/e3c6fe45a92ac11fac41d76967f9cf350322aa55092a531e46cdc1677d25/watching-0.0.4.tar.gz" } ] }