{ "info": { "author": "Ben Striner", "author_email": "btriner@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "github-bot-close-inactive-issues\r\n================================\r\n\r\nBot for automatically closing inactive GitHub issues. Based on\r\nconfiguration, bot will close inactive issues and/or post comments\r\nwarning that issues will be closed.\r\n\r\nFor each issue, bot will calculate a last modified time based on\r\ncomments, events, and issue creation.\r\n\r\n- If issue was last modified more than ``warning_start`` days ago, a\r\n warning comment is posted to the issue.\r\n- Warning messages will not be posted more than every\r\n ``warning_frequency`` days.\r\n- If issue was last modified more than ``closing`` days ago, a comment\r\n is posted and the issue is closed.\r\n\r\nBoth warning comment and closing comment are configurable.\r\n\r\nIntallation\r\n-----------\r\n\r\nStable Release\r\n~~~~~~~~~~~~~~\r\n\r\n.. code:: shell\r\n\r\n pip install github-bot-close-inactive-issues\r\n\r\nDevelopment Release\r\n~~~~~~~~~~~~~~~~~~~\r\n\r\n.. code:: shell\r\n\r\n git clone https://github.com/bstriner/github-bot-close-inactive-issues.git\r\n cd github-bot-close-inactive-issues\r\n python setup.py install\r\n\r\nConfiguration\r\n-------------\r\n\r\nBot expects the configuration file ``github_bot.yml`` in the user's home\r\ndirectory. A different file path can be provided by using the\r\n``--config`` command line option. Most configuration can also be\r\noverridden by the command line.\r\n\r\n.. code:: yaml\r\n\r\n user: user\r\n token: token\r\n repo: user/repo\r\n messages:\r\n warning: >\r\n Warning: this issue has been inactive for {days_inactive} days and\r\n will be automatically closed on {deadline:%Y-%m-%d} if there is no further activity.\r\n closing: >\r\n Notice: this issue has been closed because it has been inactive for {days_inactive} days.\r\n You may reopen this issue if it has been closed in error.\r\n schedule:\r\n warning_start: 14 # days before starting warnings\r\n warning_frequency: 7 # minimum time between warnings\r\n closing: 56 # days before closing\r\n\r\n # label to add to issues when closing automatically (optional)\r\n # label: inactive\r\n\r\n # issue warnings instead of closing until this date (optional)\r\n # first_closing_date: 2017-03-01 12:00:00\r\n\r\n # path to custom logging configuration (optional)\r\n # logging-config: /home/user/logging.conf\r\n\r\n # Do not warn or close issues opened by these users (optional)\r\n # ignore-users:\r\n # - username1\r\n # - username2\r\n\r\n # Do not warn or close issues with these labels (optional)\r\n # ignore-labels:\r\n # - label1\r\n # - label2\r\n\r\nScripts\r\n-------\r\n\r\ngithub-rate-limit.py\r\n~~~~~~~~~~~~~~~~~~~~\r\n\r\nUse ``github-rate-limit.py`` to check connection and rate limit.\r\n\r\n.. code:: shell\r\n\r\n usage: github-rate-limit.py [-h] [--config CONFIG]\r\n [--logging-config LOGGING_CONFIG] [--user USER]\r\n [--token TOKEN]\r\n\r\n Check rate limit.\r\n\r\n optional arguments:\r\n -h, --help show this help message and exit\r\n --config CONFIG Configuration file\r\n --logging-config LOGGING_CONFIG\r\n Logging configuration file\r\n --user USER Github user\r\n --token TOKEN Github token\r\n\r\ngithub-close-inactive-issues.py\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nUse ``github-close-inactive-issues.py`` to close inactive issues and\r\npost warnings.\r\n\r\n.. code:: shell\r\n\r\n usage: github-close-inactive-issues.py [-h] [--config CONFIG]\r\n [--logging-config LOGGING_CONFIG]\r\n [--user USER] [--token TOKEN]\r\n [--repo REPO] [--test]\r\n\r\n Run bot to maintain issues.\r\n\r\n optional arguments:\r\n -h, --help show this help message and exit\r\n --config CONFIG Configuration file\r\n --logging-config LOGGING_CONFIG\r\n Logging configuration file\r\n --user USER Github user\r\n --token TOKEN Github token\r\n --repo REPO Repository\r\n --test Print actions that would be taken but do not modify repository\r\n\r\nNotes\r\n-----\r\n\r\nTokens and Rate Limits\r\n~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nYou can use a password for your token but you will be rate limited to 60\r\nrequests per hour. Create an access token to raise the rate limit to\r\n5000 per hour.\r\n\r\n`Creating an Access Token for Command Line\r\nUse `__\r\n\r\nYou may provide the access token to the bot either on the command line\r\nor in the configuration file.\r\n\r\nYou should set permissions to the configuration file such that only the\r\nbot can view it.\r\n\r\nUse a Dedicated Account\r\n~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nUse a dedicated user account for the bot. The bot calculates last\r\nmodified time by checking for comments for users other than the bot.\r\nOtherwise, each time the bot posted a warning the last modified date\r\nwould reset. If you use your own account for the bot, it may close an\r\nissue if that account is the only one commenting on that issue.\r\n\r\n- Make sure to verify your account's email address\r\n- Add that account as a collaborator to your repository\r\n- **Keep your bot account password and token secret!**\r\n\r\nfirst\\_closing\\_date\r\n~~~~~~~~~~~~~~~~~~~~\r\n\r\nIf you include ``first_closing_date`` in your configuration, the bot\r\nwill not begin closing issues until that date. The bot will issue\r\nwarnings as usual.\r\n\r\nIf the calculated closing date of an issue is before the\r\n``first_closing_date``, the closing date will be pushed back until that\r\ndate.\r\n\r\nLogging\r\n~~~~~~~\r\n\r\nBot uses python ``logging`` module. A default ``logging.conf`` is\r\nprovided but can be overridden by including ``logging-config`` in\r\n``github_bot.yml`` or passing ``--logging-config`` on the command line.\r\n\r\nLabels\r\n~~~~~~\r\n\r\nBot can add a label to issues when they are closed. Make sure to create\r\nthat label on GitHub and confirm that the name exactly matches the name\r\nin the configuration file.\r\n\r\nIgnoring users\r\n~~~~~~~~~~~~~~\r\n\r\nBot can ignore issues created by selected users, such as the repository\r\nowner.\r\n\r\nQuestions?\r\n----------\r\n\r\nPlease feel free to submit issues or pull requests if you have any\r\nquestions or concerns. Cheers!\r\n\r\n\r\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/bstriner/github-bot-close-inactive-issues/tarball/v0.0.3", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bstriner/github-bot", "keywords": "github,issues,inactive,abandoned", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "github-bot-close-inactive-issues", "package_url": "https://pypi.org/project/github-bot-close-inactive-issues/", "platform": "", "project_url": "https://pypi.org/project/github-bot-close-inactive-issues/", "project_urls": { "Download": "https://github.com/bstriner/github-bot-close-inactive-issues/tarball/v0.0.3", "Homepage": "https://github.com/bstriner/github-bot" }, "release_url": "https://pypi.org/project/github-bot-close-inactive-issues/0.0.3/", "requires_dist": [ "PyGithub" ], "requires_python": "", "summary": "Bot for automatically closing inactive issues in GitHub repositories", "version": "0.0.3" }, "last_serial": 2601170, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "d34047ac3b046b8ee7d5c3098547fb46", "sha256": "577be9ee403e6f530431ddd33f64127d26e57785653328fef8e6b8afa686759b" }, "downloads": -1, "filename": "github_bot_close_inactive_issues-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d34047ac3b046b8ee7d5c3098547fb46", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11339, "upload_time": "2017-01-27T04:06:12", "url": "https://files.pythonhosted.org/packages/7f/3b/454ee39ac2c45000e93f4a346ef47436f75f2d937f78442f4caf9f9f939a/github_bot_close_inactive_issues-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4070b8bea67b676c32b9da322bacf4b2", "sha256": "8758b45cc42ffbac23e9c841a0ca1679f728bfc235184cb2fe3118d51b00491d" }, "downloads": -1, "filename": "github-bot-close-inactive-issues-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4070b8bea67b676c32b9da322bacf4b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6708, "upload_time": "2017-01-27T04:06:15", "url": "https://files.pythonhosted.org/packages/36/22/0bbecee0d3c639fd7c53569a453016606435bdbea5424db4cfa3b63ed53a/github-bot-close-inactive-issues-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d34047ac3b046b8ee7d5c3098547fb46", "sha256": "577be9ee403e6f530431ddd33f64127d26e57785653328fef8e6b8afa686759b" }, "downloads": -1, "filename": "github_bot_close_inactive_issues-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d34047ac3b046b8ee7d5c3098547fb46", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11339, "upload_time": "2017-01-27T04:06:12", "url": "https://files.pythonhosted.org/packages/7f/3b/454ee39ac2c45000e93f4a346ef47436f75f2d937f78442f4caf9f9f939a/github_bot_close_inactive_issues-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4070b8bea67b676c32b9da322bacf4b2", "sha256": "8758b45cc42ffbac23e9c841a0ca1679f728bfc235184cb2fe3118d51b00491d" }, "downloads": -1, "filename": "github-bot-close-inactive-issues-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4070b8bea67b676c32b9da322bacf4b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6708, "upload_time": "2017-01-27T04:06:15", "url": "https://files.pythonhosted.org/packages/36/22/0bbecee0d3c639fd7c53569a453016606435bdbea5424db4cfa3b63ed53a/github-bot-close-inactive-issues-0.0.3.tar.gz" } ] }