{"id":18308497,"url":"https://github.com/heroesofcode/pullpanda-cli","last_synced_at":"2025-04-09T11:28:47.596Z","repository":{"id":242437343,"uuid":"809232777","full_name":"heroesofcode/pullpanda-cli","owner":"heroesofcode","description":"This script automates code review by calculating the differences between the current branch and the main branch of a git local project repository. It then sends these differences to the Gemini AI API, which generates detailed improvement suggestions.","archived":false,"fork":false,"pushed_at":"2025-01-31T15:02:53.000Z","size":120,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T05:27:12.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/heroesofcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-06-02T05:08:18.000Z","updated_at":"2025-01-31T15:02:49.000Z","dependencies_parsed_at":"2024-06-03T03:25:55.052Z","dependency_job_id":"f52fcc31-d128-46e4-bd0c-9cec51a728ec","html_url":"https://github.com/heroesofcode/pullpanda-cli","commit_stats":null,"previous_names":["heroesofcode/pullpanda-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2Fpullpanda-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2Fpullpanda-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2Fpullpanda-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroesofcode%2Fpullpanda-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heroesofcode","download_url":"https://codeload.github.com/heroesofcode/pullpanda-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248030247,"owners_count":21036152,"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":[],"created_at":"2024-11-05T16:08:14.331Z","updated_at":"2025-04-09T11:28:47.564Z","avatar_url":"https://github.com/heroesofcode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image (1)-Photoroom](https://github.com/heroesofcode/pullpanda/assets/13969802/bc5b59e7-8345-4ab4-b40e-3f35a8d09721)\n\n# Pull Panda\n\nThis tool automates the process of code review using the Gemini API. It helps developers streamline their code review process by generating detailed feedback and suggestions for improvement.\n\n## Features\n\n* **Calculate Git Diffs:** Automatically calculates the differences between the current branch and the main branch of a Git repository.\n\n* **Send Diffs for Review:** Sends the calculated diffs to the Gemini API for a detailed code review.\n  \n* **Save Review Reports:** Saves the review feedback in a HTML file for easy reference and sharing.\n\n## Prerequisites\n\n* Python 3.x\n* **gitpython** library\n* **request** library\n* Gemini API token\n\n## Installation\n\n1. Clone this repository to your local machine:\n\n   ```bash\n   https://github.com/heroesofcode/pullpanda-cli.git\n   cd pullpanda-cli\n   ```\n   \n2. Install the required Python packages: \n\n```bash\npip install gitpython requests\n```\n\n3. Set up your Gemini API token: \n\n* Open the script file in a text editor.\n\n* Replace the GEMINI_AI_TOKEN variable with your actual Gemini API token:\n\n```python\nGEMINI_AI_TOKEN = \"your_api_token_here\"\n```\n\n## Usage\n\n1. Run the script: \n\n```bash\npython pullpanda.py\n```\n\n2. Enter the path to your local project repository when prompted.\n\n3. The script will calculate the diff between the current branch and the main branch (assumed to be **develop** in this example). Modify the script if your main branch has a different name.\n\n4. The diff will be sent to the Gemini API for review.\n\n5. The review feedback will be saved as a HTML file in the **reports** directory within the script's directory.\n\n## Example Output\n\nUpon successful execution, you will see a message indicating where the review report has been saved:\n\n```bash\nThe report file has been saved at: /path/to/reports/pullpanda_report.html\n```\n\n## Customization\n\n* **Main Branch:** If your main branch is not named develop, change the line in the get_diff function:\n\n```python\nmain_branch = repo.heads['your_main_branch']\n```\n\n* **Review Prompt:** Customize the review prompt in the **send_diff_for_code_review** function if needed:\n\n```python\n\"text\": \"Your custom prompt here: \" + diff\n```\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroesofcode%2Fpullpanda-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheroesofcode%2Fpullpanda-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroesofcode%2Fpullpanda-cli/lists"}