# gitlab-projects-issues
<!-- markdownlint-disable no-inline-html -->
[![Build](https://gitlab.com/AdrianDC/gitlab-projects-issues/badges/main/pipeline.svg)](https://gitlab.com/AdrianDC/gitlab-projects-issues/-/commits/main/)
Generate GitLab project issues and milestones statistics automatically
---
## Purpose
This tool can automatically generate issues and milestones statistics,
by analyzing project's issues, detecting milestones and assignees.
If issues without time estimations are found, `~?` will be shown before time outputs.
Milestone statistics will automatically be injected in the milestone description,
with a markdown table of assignees, timings, progress and issues total.
The following step is required before using the tool:
- The GitLab user tokens must be created with an `api` scope (a short expiration date is recommended)
---
## Outputs
Milestones statistics will automatically be added to each milestone's description.
The following example shows how milestones statistics may look on a project:
> ## Milestone statistics - MILESTONE NAME
>
> | Assignees | Issues | Estimated | Spent | Remaining | Progress |
> |-----------|--------|-----------|-------|-----------|----------|
> | **Without assignee** | 10 | 18d | 18d | / | ██████████ 100.00% |
> | **USER ONE** | 22 | 42d | 5d | 37d | █▂▁▁▁▁▁▁▁▁ 11.90% |
> | **USER TWO** | 29 | 50d 2h | 20d 6h | 29d 4h | ████▂▁▁▁▁▁ 41.29% |
> | **USER THREE** | 7 | 9d 2h | 3d 4h | 5d 6h | ███▅▁▁▁▁▁▁ 37.84% |
> | **USER FOUR** | 6 | 21d | / | 21d | ▁▁▁▁▁▁▁▁▁▁ 0.00% |
> | _**Total**_ | _74_ | _135d 4h_ | _47d 2h_ | 93d 2h | _███▄▁▁▁▁▁▁ 34.87%_ |
>
> _Last update using gitlab-projects-issues : 2024-06-01 19:38:48 UTC_
---
## Examples
<!-- prettier-ignore-start -->
```bash
# Show the helper menu
gitlab-projects-issues
# Inject milestones statistics into milestones' description
gitlab-projects-issues --milestones-statistics 'https://gitlab.com' 'group/project'
# Inject milestones statistics into milestones' description (with default 20h time per unestimated issues)
gitlab-projects-issues --milestones-statistics --default-estimate '20' 'https://gitlab.com' 'group/project'
```
<!-- prettier-ignore-end -->
---
## Usage
<!-- prettier-ignore-start -->
<!-- readme-help-start -->
```yaml
usage: gitlab-projects-issues [-h] [--version] [--update-check] [--settings] [--set GROUP KEY VAL] [-t TOKEN] [--dump]
[--default-estimate DEFAULT_ESTIMATE] [--exclude-closed-issues] [--milestone MILESTONE]
[--milestones-statistics] [--exclude-closed-milestones] [--]
[gitlab] [path]
gitlab-projects-issues: Generate GitLab project issues and milestones statistics automatically
internal arguments:
-h, --help # Show this help message
--version # Show the current version
--update-check # Check for newer package updates
--settings # Show the current settings path and contents
--set GROUP KEY VAL # Set settings specific 'VAL' value to [GROUP] > KEY
# or unset by using 'UNSET' as 'VAL'
credentials arguments:
-t TOKEN # GitLab API token (default: GITLAB_TOKEN environment)
common arguments:
--dump # Dump Python objects of projects
issues arguments:
--default-estimate DEFAULT_ESTIMATE # Default issue time estimate if none providedin hours (default: 8)
--exclude-closed-issues # Exclude issues in closed state
milestones arguments:
--milestone MILESTONE # Use a specific milestone by name, by ID, or "None"
--milestones-statistics # Inject milestones statistics into milestones' description
--exclude-closed-milestones # Exclude milestones in closed state
positional arguments:
-- # Positional arguments separator (recommended)
gitlab # GitLab URL (default: https://gitlab.com)
path # GitLab project path
```
<!-- readme-help-stop -->
<!-- prettier-ignore-end -->
---
## Userspace available settings
`gitlab-projects-issues` creates a `settings.ini` configuration file in a userspace folder.
For example, it allows to disable the automated updates daily check (`[updates] > enabled`)
The `settings.ini` file location and contents can be shown with the following command:
```bash
gitlab-projects-issues --settings
```
---
## Environment available configurations
`gitlab-projects-issues` uses `colored` for colors outputs.
If colors of both outputs types do not match the terminal's theme,
an environment variable `NO_COLOR=1` can be defined to disable colors.
---
## Dependencies
- [colored](https://pypi.org/project/colored/): Terminal colors and styles
- [python-gitlab](https://pypi.org/project/python-gitlab/): A python wrapper for the GitLab API
- [setuptools](https://pypi.org/project/setuptools/): Build and manage Python packages
- [update-checker](https://pypi.org/project/update-checker/): Check for package updates on PyPI
---
## References
- [git-chglog](https://github.com/git-chglog/git-chglog): CHANGELOG generator
- [gitlab-release](https://pypi.org/project/gitlab-release/): Utility for publishing on GitLab
- [gitlabci-local](https://pypi.org/project/gitlabci-local/): Launch .gitlab-ci.yml jobs locally
- [mypy](https://pypi.org/project/mypy/): Optional static typing for Python
- [PyPI](https://pypi.org/): The Python Package Index
- [twine](https://pypi.org/project/twine/): Utility for publishing on PyPI
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/AdrianDC/gitlab-projects-issues",
"name": "gitlab-projects-issues",
"maintainer": null,
"docs_url": null,
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=3",
"maintainer_email": null,
"keywords": "gitlab projects issues milestones",
"author": "Adrian DC",
"author_email": "radian.dc@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/77/f7/93a3b2ae6c1e6bec945dd5af8507c2d06a04b41bd16512aa77f82653b16c/gitlab_projects_issues-1.0.3.tar.gz",
"platform": null,
"description": "# gitlab-projects-issues\n\n<!-- markdownlint-disable no-inline-html -->\n\n[![Build](https://gitlab.com/AdrianDC/gitlab-projects-issues/badges/main/pipeline.svg)](https://gitlab.com/AdrianDC/gitlab-projects-issues/-/commits/main/)\n\nGenerate GitLab project issues and milestones statistics automatically\n\n---\n\n## Purpose\n\nThis tool can automatically generate issues and milestones statistics, \nby analyzing project's issues, detecting milestones and assignees.\n\nIf issues without time estimations are found, `~?` will be shown before time outputs.\n\nMilestone statistics will automatically be injected in the milestone description, \nwith a markdown table of assignees, timings, progress and issues total.\n\nThe following step is required before using the tool:\n\n- The GitLab user tokens must be created with an `api` scope (a short expiration date is recommended)\n\n---\n\n## Outputs\n\nMilestones statistics will automatically be added to each milestone's description.\n\nThe following example shows how milestones statistics may look on a project:\n\n> ## Milestone statistics - MILESTONE NAME\n>\n> | Assignees | Issues | Estimated | Spent | Remaining | Progress |\n> |-----------|--------|-----------|-------|-----------|----------|\n> | **Without assignee** | 10 | 18d | 18d | / | \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 100.00% |\n> | **USER ONE** | 22 | 42d | 5d | 37d | \u2588\u2582\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581 11.90% |\n> | **USER TWO** | 29 | 50d 2h | 20d 6h | 29d 4h | \u2588\u2588\u2588\u2588\u2582\u2581\u2581\u2581\u2581\u2581 41.29% |\n> | **USER THREE** | 7 | 9d 2h | 3d 4h | 5d 6h | \u2588\u2588\u2588\u2585\u2581\u2581\u2581\u2581\u2581\u2581 37.84% |\n> | **USER FOUR** | 6 | 21d | / | 21d | \u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581 0.00% |\n> | _**Total**_ | _74_ | _135d 4h_ | _47d 2h_ | 93d 2h | _\u2588\u2588\u2588\u2584\u2581\u2581\u2581\u2581\u2581\u2581 34.87%_ |\n>\n> _Last update using gitlab-projects-issues : 2024-06-01 19:38:48 UTC_\n\n---\n\n## Examples\n\n<!-- prettier-ignore-start -->\n\n```bash\n# Show the helper menu\ngitlab-projects-issues\n\n# Inject milestones statistics into milestones' description\ngitlab-projects-issues --milestones-statistics 'https://gitlab.com' 'group/project'\n\n# Inject milestones statistics into milestones' description (with default 20h time per unestimated issues)\ngitlab-projects-issues --milestones-statistics --default-estimate '20' 'https://gitlab.com' 'group/project'\n```\n\n<!-- prettier-ignore-end -->\n\n---\n\n## Usage\n\n<!-- prettier-ignore-start -->\n<!-- readme-help-start -->\n\n```yaml\nusage: gitlab-projects-issues [-h] [--version] [--update-check] [--settings] [--set GROUP KEY VAL] [-t TOKEN] [--dump]\n [--default-estimate DEFAULT_ESTIMATE] [--exclude-closed-issues] [--milestone MILESTONE]\n [--milestones-statistics] [--exclude-closed-milestones] [--]\n [gitlab] [path]\n\ngitlab-projects-issues: Generate GitLab project issues and milestones statistics automatically\n\ninternal arguments:\n -h, --help # Show this help message\n --version # Show the current version\n --update-check # Check for newer package updates\n --settings # Show the current settings path and contents\n --set GROUP KEY VAL # Set settings specific 'VAL' value to [GROUP] > KEY\n # or unset by using 'UNSET' as 'VAL'\n\ncredentials arguments:\n -t TOKEN # GitLab API token (default: GITLAB_TOKEN environment)\n\ncommon arguments:\n --dump # Dump Python objects of projects\n\nissues arguments:\n --default-estimate DEFAULT_ESTIMATE # Default issue time estimate if none providedin hours (default: 8)\n --exclude-closed-issues # Exclude issues in closed state\n\nmilestones arguments:\n --milestone MILESTONE # Use a specific milestone by name, by ID, or \"None\"\n --milestones-statistics # Inject milestones statistics into milestones' description\n --exclude-closed-milestones # Exclude milestones in closed state\n\npositional arguments:\n -- # Positional arguments separator (recommended)\n gitlab # GitLab URL (default: https://gitlab.com)\n path # GitLab project path\n```\n\n<!-- readme-help-stop -->\n<!-- prettier-ignore-end -->\n\n---\n\n## Userspace available settings\n\n`gitlab-projects-issues` creates a `settings.ini` configuration file in a userspace folder.\n\nFor example, it allows to disable the automated updates daily check (`[updates] > enabled`)\n\nThe `settings.ini` file location and contents can be shown with the following command:\n\n```bash\ngitlab-projects-issues --settings\n```\n\n---\n\n## Environment available configurations\n\n`gitlab-projects-issues` uses `colored` for colors outputs.\n\nIf colors of both outputs types do not match the terminal's theme, \nan environment variable `NO_COLOR=1` can be defined to disable colors.\n\n---\n\n## Dependencies\n\n- [colored](https://pypi.org/project/colored/): Terminal colors and styles\n- [python-gitlab](https://pypi.org/project/python-gitlab/): A python wrapper for the GitLab API\n- [setuptools](https://pypi.org/project/setuptools/): Build and manage Python packages\n- [update-checker](https://pypi.org/project/update-checker/): Check for package updates on PyPI\n\n---\n\n## References\n\n- [git-chglog](https://github.com/git-chglog/git-chglog): CHANGELOG generator\n- [gitlab-release](https://pypi.org/project/gitlab-release/): Utility for publishing on GitLab\n- [gitlabci-local](https://pypi.org/project/gitlabci-local/): Launch .gitlab-ci.yml jobs locally\n- [mypy](https://pypi.org/project/mypy/): Optional static typing for Python\n- [PyPI](https://pypi.org/): The Python Package Index\n- [twine](https://pypi.org/project/twine/): Utility for publishing on PyPI\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Generate GitLab project issues and milestones statistics automatically",
"version": "1.0.3",
"project_urls": {
"Bug Reports": "https://gitlab.com/AdrianDC/gitlab-projects-issues/-/issues",
"Changelog": "https://gitlab.com/AdrianDC/gitlab-projects-issues/blob/main/CHANGELOG.md",
"Documentation": "https://gitlab.com/AdrianDC/gitlab-projects-issues#gitlab-projects-issues",
"Homepage": "https://gitlab.com/AdrianDC/gitlab-projects-issues",
"Source": "https://gitlab.com/AdrianDC/gitlab-projects-issues",
"Statistics": "https://pypistats.org/packages/gitlab-projects-issues"
},
"split_keywords": [
"gitlab",
"projects",
"issues",
"milestones"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ed5d0e9fad9f92f7a5149fe6ee8eae36365a19f2b400c019e8c1723c057e6a8a",
"md5": "25e8f85dcd88d210abf9a82a9389b566",
"sha256": "a1347f407be911cbf9c8ddca656ccecc919fc885f53fd9fd93eb148c9f7f098c"
},
"downloads": -1,
"filename": "gitlab_projects_issues-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "25e8f85dcd88d210abf9a82a9389b566",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=3",
"size": 25248,
"upload_time": "2024-06-10T23:04:58",
"upload_time_iso_8601": "2024-06-10T23:04:58.833743Z",
"url": "https://files.pythonhosted.org/packages/ed/5d/0e9fad9f92f7a5149fe6ee8eae36365a19f2b400c019e8c1723c057e6a8a/gitlab_projects_issues-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "77f793a3b2ae6c1e6bec945dd5af8507c2d06a04b41bd16512aa77f82653b16c",
"md5": "1598778c1c523904841a1083872c3c1c",
"sha256": "eea1f67e8da673556b9b4ed9c92ee3b909ed3301ef90c94b710bd438fcfe58d5"
},
"downloads": -1,
"filename": "gitlab_projects_issues-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "1598778c1c523904841a1083872c3c1c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=3",
"size": 26029,
"upload_time": "2024-06-10T23:05:07",
"upload_time_iso_8601": "2024-06-10T23:05:07.415872Z",
"url": "https://files.pythonhosted.org/packages/77/f7/93a3b2ae6c1e6bec945dd5af8507c2d06a04b41bd16512aa77f82653b16c/gitlab_projects_issues-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-10 23:05:07",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "AdrianDC",
"gitlab_project": "gitlab-projects-issues",
"lcname": "gitlab-projects-issues"
}