{"id":27172757,"url":"https://github.com/shahafmordechay/gitask","last_synced_at":"2025-07-26T23:39:05.307Z","repository":{"id":286687276,"uuid":"868178198","full_name":"shahafMordechay/Gitask","owner":"shahafMordechay","description":"Streamline your development workflow with a Git-aware CLI for project issues automation.","archived":false,"fork":false,"pushed_at":"2025-06-14T18:29:59.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T22:09:00.844Z","etag":null,"topics":["automatio","cli","developer-tools","git","gitlab","jira","p","task-tracking","workflow"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/gitask/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shahafMordechay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-05T17:16:17.000Z","updated_at":"2025-05-29T19:20:35.000Z","dependencies_parsed_at":"2025-05-29T20:25:12.294Z","dependency_job_id":"38980a96-5ad1-4417-ad3b-a427197bc905","html_url":"https://github.com/shahafMordechay/Gitask","commit_stats":null,"previous_names":["shahafmordechay/gitask"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/shahafMordechay/Gitask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahafMordechay%2FGitask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahafMordechay%2FGitask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahafMordechay%2FGitask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahafMordechay%2FGitask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shahafMordechay","download_url":"https://codeload.github.com/shahafMordechay/Gitask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahafMordechay%2FGitask/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264446715,"owners_count":23609632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatio","cli","developer-tools","git","gitlab","jira","p","task-tracking","workflow"],"created_at":"2025-04-09T10:29:59.036Z","updated_at":"2025-07-09T11:06:40.376Z","avatar_url":"https://github.com/shahafMordechay.png","language":"Python","readme":"# Gitask\n\n## Overview\n\nGitask is a CLI tool that automates issue transition workflows, integrating with version control systems (VCS). It utilizes a user-defined script to extract the relevant issue ID, and ensures seamless task management with minimal manual intervention.\n\n\n## Features\n\n- **Seamless Issue Transitions**: Automatically move issues between statuses ('To Do' to 'In Progress,' 'In Review,' ‘Done') without manually specifying the issue ID.\n\n- **Automated Workflow Actions**: Handles related actions such as updating issue metadata, assigning reviewers, and creating pull requests to streamline your workflow.\n\n- **Smart Autocompletion**: Supports shell completion for faster command usage.\n\n- **Interactive Configuration**: Set up Gitask with a guided interactive process to configure all necessary settings.\n\n\n## Installation\n\n```bash\npip install gitask\n```\n\nIf installation fails try to use a virtual environment:\n\n```bash\npython3 -m venv gitask-env\nsource gitask-env/bin/activate\npip install gitask\n```\n\n\n## Configuration\n\nGitask uses a combination of environment variables and a JSON configuration file for maximum flexibility and security.\n\n### Environment Variables\n| **Variable**         | **Description**                                                     |\n|----------------------|---------------------------------------------------------------------|\n| `GITASK_CONFIG_PATH` | Path to the configuration file. Defaults to `~/.gitask_config.json` |\n| `GITASK_PMT_TOKEN`   | Authentication token for your project management tool               |\n| `GITASK_PMT_URL`     | Base URL for your project management tool                           |\n| `GITASK_GIT_TOKEN`   | Authentication token for your version control system                |\n| `GITASK_GIT_URL`     | Base URL for your version control system                            |\n\n### Configuration File\nThe configuration file is a JSON file that specifies the integration details for the project management tool and the version control system.\n\n```json\n{\n  \"pmt-type\": \"jira\",\n  \"vcs-type\": \"gitlab\",\n  \"git-project\": \"group/project\",\n  \"current-ticket\": \"/workspace/my-scripts/get_issue_id.sh\",\n  \"to-do\": [\n    \"Open\"\n  ],\n  \"in-progress\": [\n    \"Start working\",\n    \"Back to work\"\n  ],\n  \"in-review\": [\n    \"To review\"\n  ],\n  \"done\": [\n    \"Resolve\"\n  ],\n  \"git-branch-field\": \"customfield_10001\",\n  \"reviewer-field\": \"customfield_10101\"\n}\n```\n\n| **Field**          | **Description**                                                                                                                       |\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| `pmt-type`         | Specifies the project management tool being used (e.g., \"Jira\", \"GitHub\", \"Clickup\", \"Trello\")                                                             |\n| `vcs-type`         | Specifies the version control system being used (e.g., \"GitLab\", \"GitHub\", \"Bitbucket\")                                                            |\n| `git-project`      | The path to the project in your VCS (e.g., \"group/project\" in GitLab or \"owner/repo\" in GitHub)                                       |\n| `current-ticket`   | Path to the script that extracts the current issue ID from your working environment (see [Issue ID Extraction](#issue-iD-extraction)) |\n| `to-do`            | An array of status transition names that lead to your corresponding \"To Do\" status                                                    |\n| `in-progress`      | An array of status transition names that lead to your corresponding \"In Progress\" status                                              |\n| `in-review`        | An array of status transition names that lead to your corresponding \"In Review\" status                                                |\n| `done`             | An array of status transition names that lead to your corresponding \"Done\" status                                                     |\n| `git-branch-field` | The custom issue field ID for storing the git branch name in your PMT (required only if it's a custom field)                          |\n| `reviewer-field`   | The custom issue field ID for storing the reviewer username in your PMT (required only if it's a custom field)                        |\n\n### Interactive Setup\nFor a guided configuration experience, use the built-in interactive setup: `gitask configure`.\nThis process will:\n1. Guide you through setting up PMT and VCS connections.\n2. Configure custom fields.\n3. Define issue ID extraction script.\n4. Create the JSON configuration file.\n5. Enable shell autocompletion (optional).\n\n\n## Usage\n\n### Open a Ticket\n\n\u0026ensp; Moves the ticket to \"To Do\" status.\n\n\u0026ensp; `gitask open`\n\u003cbr\u003e\n\n### Start Working on an Issue\n\n\u0026ensp; Moves it to \"In Progress\".\n\n\u0026ensp; `gitask start-working`\n\u003cbr\u003e\n\n### Submit  for Review\n\n\u0026ensp; Moves it to \"In Review\".\n\n\u0026ensp; Updates the issue's \"git branch\" and \"reviewer\" fields.\n\n\u0026ensp; Creates a pull request.\n\n\u0026ensp;  `gitask submit-to-review`\n\u003cbr\u003e\n\n### Mark Issue as Done\n\n\u0026ensp; Marks the issue as \"Done\".\n\n\u0026ensp; `gitask done`\n\u003cbr\u003e\n\n### Interactive Configuration\n\n\u0026ensp; Guides you through setting up Gitask step by step.\n\n\u0026ensp; `gitask configure`\n\u003cbr\u003e\n\n## Supported Integrations\n\n### Project Management Tools\n\n- Jira\n- GitHub Issues\n\n### Version Control Systems\n\n- GitLab\n- GitHub\n\n\n## Gitask Hooks\nGitask supports pre and post hooks for specific actions.\u003cbr\u003e\nThese hooks allow you to execute custom scripts before or after an action is performed. This can be useful for automating additional custom actions.\u003cbr\u003e\n\nHooks are automatically executed by Gitask when the corresponding action is performed. If a hook script fails, the action will stop, and an error message will be displayed.\n\n### Configuring Hooks\nHooks can be configured in the Gitask configuration file. Each action can have a *pre* and/or *post* hook defined.\n\nConfiguration example:\n```json\n{\n  \"pmt-type\": \"jira\",\n  \"vcs-type\": \"gitlab\",\n  ...,\n  \"hooks\": {\n    \"open\": {\n      \"pre\": \"/path/to/pre_open_hook.sh\",\n      \"post\": \"/path/to/post_open_hook.py\"\n    },\n    \"submit-to-review\": {\n      \"pre\": \"/path/to/pre_submit_hook.sh\",\n      \"post\": \"/path/to/post_submit_hook.py\"\n    }\n  }\n}\n```\n\n### Hook script\nThe hook script can be either a python or a bash **executable** script.\nThe arguments passed to the scripts are:\n- `--pmt-url`: The project management tool URL\n- `--pmt-token`: The authentication token for the project management tool\n- `--git-url`: The Git repository URL\n- `--git-token`: The authentication token for the Git repository\n- `--issue-key`: The current issue key\n- `--command-params`: JSON string containing command parameters **(Python hooks only)**\n\n### Examples:\n#### Python\n```python\nimport argparse\nimport json\n\nif __name__ == \"__main__\":\n   parser = argparse.ArgumentParser()\n   parser.add_argument(\"--pmt-url\")\n   parser.add_argument(\"--pmt-token\")\n   parser.add_argument(\"--git-url\")\n   parser.add_argument(\"--git-token\")\n   parser.add_argument(\"--issue-key\")\n   parser.add_argument(\"--command-params\")\n   \n   args = parser.parse_args()\n   \n   # Parse command parameters if provided\n   command_params = {}\n   if args.command_params:\n       command_params = json.loads(args.command_params)\n   \n   print(f\"Running hook for issue: {args.issue_key}\")\n   print(f\"PMT URL: {args.pmt_url}\")\n   print(f\"GIT URL: {args.git_url}\")\n   print(f\"Command parameters: {command_params}\")\n```\n\n#### Bash\n```bash\n#!/bin/bash\nfor arg in \"$@\"; do\n  case $arg in\n    --pmt-url=*)\n      PMT_URL=\"${arg#*=}\"\n      ;;\n    --pmt-token=*)\n      PMT_TOKEN=\"${arg#*=}\"\n      ;;\n  esac\ndone\n\necho \"Pre-hook for 'open' action triggered.\"\necho \"PMT URL: $PMT_URL\"\necho \"Issue Key: $1\"\n```\n\n\n## Issue ID Extraction\n\nThe current-ticket script should:\n1. Output the issue ID according to the current git branch.\n   - It can be extracted from the branch name, commit message, or any other relevant source.\n2. Have executable permissions.\n\n### Example\n\n```bash\n#!/bin/bash\n# Extract JIRA issue ID from current Git branch\nBRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)\nISSUE=$(echo \"$BRANCH_NAME\" | grep -o \"COMPANY-[0-9]\\{5\\}\")\necho $ISSUE\n```\n\n## Troubleshooting\n\n#### 1. ERROR: No matching distribution found for python-gitlab\u003e=5.6.0\n   If you encounter this error, run the following command to install the required package:\n   ```bash\n   pip install --upgrade python-gitlab --index-url https://pypi.org/simple/\n   ```\n   If you're working within a virtual environment, ensure that it is activated before running the above command.\n   \u003cbr\u003e\n\n#### 2. Shell fails to recognize gitask command\n   If your shell does not recognize the gitask command after installation, it's likely because the virtual environment's bin directory is not in your PATH.\u003cbr\u003e\n   To fix this, add the path to your virtual environment's bin directory in your shell profile (e.g., .bashrc, .zshrc):\n   ```bash\n   export PATH=\"/path/to/your/virtualenv/bin:$PATH\"\n   ```\n   After making this change, restart your terminal or run `source ~/.zshrc` (or equivalent) to apply the update.\n   \u003cbr\u003e\n\n#### 3. macOS OpenSSL and urllib3 Issues\n   If you encounter SSL-related errors on macOS, particularly with urllib3, you can resolve this by installing urllib3 version lower than 2:\n   ```bash\n   pip install 'urllib3\u003c2.0'\n   ```\n   This is a known issue with macOS and OpenSSL compatibility. The downgrade to urllib3 provides better compatibility with macOS's OpenSSL implementation.\n   \u003cbr\u003e\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE file](https://github.com/shahafMordechay/Gitask/blob/main/LICENSE) for details.\n\n\n## Contributing\n\nContributions are welcome! Feel free to submit pull requests or open issues.\n\n1. Fork the repository \n2. Create your feature branch following the naming convention:\u003cbr\u003e\n   `git checkout -b username/feature/issue_number-branch-description`\n   \u003cbr\u003eor\u003cbr\u003e\n   `git checkout -b username/bug/issue_number-branch-description`\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin username/feature/issue_number-branch-description`)\n5. Open a Pull Request\n\n\n## Support\n\nFor issues, open a GitHub issue or reach out via discussions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahafmordechay%2Fgitask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahafmordechay%2Fgitask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahafmordechay%2Fgitask/lists"}