{ "info": { "author": "Haseeb Majid", "author_email": "me@haseebmajid.dev", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://gitlab.com/gitlab-automation-toolkit/gitlab-auto-close-issue/badges/master/pipeline.svg\n :target: https://gitlab.com/gitlab-automation-toolkit/gitlab-auto-close-issue\n :alt: Pipeline Status\n\n.. image:: https://img.shields.io/pypi/l/gitlab-auto-close-issue.svg\n :target: https://pypi.org/project/gitlab-auto-close-issue/\n :alt: PyPI Project License\n\n.. image:: https://img.shields.io/pypi/v/gitlab-auto-close-issue.svg\n :target: https://pypi.org/project/gitlab-auto-close-issue/\n :alt: PyPI Project Version\n\n.. image:: https://readthedocs.org/projects/gitlab-auto-close-issue/badge/?version=latest\n :target: https://gitlab-auto-close-issue.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\ngitlab-auto-close-issue\n=======================\n\nThis is a simple Python cli script that allows you close issues on GitLab automatically. It is intended to be\nused during your CI/CD. However you can chose to use it however you wish.\n\nUsage\n-----\n\nFirst you need to create a personal access token, `more information here\n`_. With the scope ``api``, so it can close the issue for you.\n\n.. code-block:: bash\n\n pip install gitlab-auto-close-issue\n gitlab_auto_close_issue --help\n\n Usage: gitlab_auto_close_issue [OPTIONS]\n\n GitLab Auto Close Issue\n\n Options:\n --private-token TEXT Private GITLAB token, used to authenticate when\n calling the auto issue close API. [required]\n --project-id INTEGER The project ID on GitLab to create the auto close API for.\n [required]\n --gitlab-url TEXT The GitLab URL.\n [required]\n -i, --issue TEXT The Issue ID to close. [required]\n -r, --remove-label TEXT The labels to remove from (all) the issue(s) before\n closing it.\n --help Show this message and exit.\n\n.. code-block:: bash\n\n $ gitlab_auto_close_issue --private-token xxx --project-url https://gitlab.com/hmajid2301/test \\\n --project-id 14416075 --issue 1 --remove-label bug\n\nGitLab CI\n*********\n\nSet a secret variable in your GitLab project with your private token. Name it ``GITLAB_PRIVATE_TOKEN`` (``CI/CD > Environment Variables``).\nThis is necessary to close the issue on your behalf.\nMore information `click here `_.\nThis access token is passed to the script with the ``--private-token`` argument.\nAn example CI using this can be found\n`here `_,\nlook for the ``close:issue`` job.\n\nAdd the following to your ``.gitlab-ci.yml`` file:\n\n.. code-block:: yaml\n\n stages:\n - post\n\n close:issue:\n image: registry.gitlab.com/gitlab-automation-toolkit/gitlab-auto-close-issue\n stage: post\n before_script: []\n script:\n - gitlab_auto_close_issue --issue 1 --remove-label \"Doing\" --remove-label \"To Do\"\n\nPredefined Variables\n^^^^^^^^^^^^^^^^^^^^\n\nPlease note some of the arguments can be filled in using environment variables defined during GitLab CI.\nFor more information `click here _`.\n\n* If ``--private-token`` is not set the script will look for the ENV variable ``GITLAB_PRIVATE_TOKEN``\n* If ``--source-branch`` is not set the script will look for the ENV variable ``CI_COMMIT_REF_NAME``\n* If ``--project-id`` is not set it will look for for the ENV variable ``CI_PROJECT_ID``\n* If ``--gitlab-url`` is not set it will look for for the ENV variable ``CI_PROJECT_URL``\n* If ``--user-id`` is not set it will look for for the ENV variable ``GITLAB_USER_ID``\n\n\nSetup Development Environment\n==============================\n\n.. code-block:: bash\n\n git clone git@gitlab.com:gitlab-automation-toolkit/gitlab-auto-close-issue.git\n cd gitlab-auto-close-issue\n pip install tox\n make virtualenv\n make install-dev\n\n\nChangelog\n=========\n\nYou can find the `changelog here `_.", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/gitlab-automation-toolkit/gitlab-auto-close-issue", "keywords": "", "license": "Apache License", "maintainer": "", "maintainer_email": "", "name": "gitlab-auto-close-issue", "package_url": "https://pypi.org/project/gitlab-auto-close-issue/", "platform": "", "project_url": "https://pypi.org/project/gitlab-auto-close-issue/", "project_urls": { "Homepage": "https://gitlab.com/gitlab-automation-toolkit/gitlab-auto-close-issue" }, "release_url": "https://pypi.org/project/gitlab-auto-close-issue/1.0.0/", "requires_dist": null, "requires_python": "~=3.7", "summary": "Python script which will automatically close issues on GitLab for you.", "version": "1.0.0", "yanked": false, "yanked_reason": null }, "last_serial": 6033975, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "446856d3b139ce3024995240a7b8dafe", "sha256": "cc284748b8893dab6999c7dfef75e19c1f4e1215260e6442c45a992688d2e170" }, "downloads": -1, "filename": "gitlab-auto-close-issue-0.1.0.tar.gz", "has_sig": false, "md5_digest": "446856d3b139ce3024995240a7b8dafe", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 3576, "upload_time": "2019-09-20T18:58:19", "upload_time_iso_8601": "2019-09-20T18:58:19.516870Z", "url": "https://files.pythonhosted.org/packages/38/f6/9007c74e4a8ba798192b0633336e964286a41c03cf1640bce696e994ccc7/gitlab-auto-close-issue-0.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "528eacb7989b7779d77136da13a3e14d", "sha256": "9da21de5ce7ade926db4a7e7236b97c7cf1e2616b6badfd79566f0093f3741b7" }, "downloads": -1, "filename": "gitlab-auto-close-issue-1.0.0.tar.gz", "has_sig": false, "md5_digest": "528eacb7989b7779d77136da13a3e14d", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 4174, "upload_time": "2019-10-26T14:34:16", "upload_time_iso_8601": "2019-10-26T14:34:16.638540Z", "url": "https://files.pythonhosted.org/packages/28/74/2b04311bfeb672ba7135784d9351b357836bbd0d9a6c39b84508765568c7/gitlab-auto-close-issue-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "528eacb7989b7779d77136da13a3e14d", "sha256": "9da21de5ce7ade926db4a7e7236b97c7cf1e2616b6badfd79566f0093f3741b7" }, "downloads": -1, "filename": "gitlab-auto-close-issue-1.0.0.tar.gz", "has_sig": false, "md5_digest": "528eacb7989b7779d77136da13a3e14d", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 4174, "upload_time": "2019-10-26T14:34:16", "upload_time_iso_8601": "2019-10-26T14:34:16.638540Z", "url": "https://files.pythonhosted.org/packages/28/74/2b04311bfeb672ba7135784d9351b357836bbd0d9a6c39b84508765568c7/gitlab-auto-close-issue-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }