{"id":30685259,"url":"https://github.com/ravilushqa/gpt-pullrequest-updater","last_synced_at":"2025-09-01T21:19:58.396Z","repository":{"id":161327261,"uuid":"630358063","full_name":"ravilushqa/gpt-pullrequest-updater","owner":"ravilushqa","description":"Generate pull request description or create a review using chatgpt","archived":false,"fork":false,"pushed_at":"2023-07-13T03:28:02.000Z","size":113,"stargazers_count":23,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-21T19:00:41.394Z","etag":null,"topics":["actions","chatgpt","github-actions","golang","gpt","pullrequest","review-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ravilushqa.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":"2023-04-20T08:00:51.000Z","updated_at":"2024-06-10T12:59:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"17ace9c3-bafb-46d0-84ed-a256c319d199","html_url":"https://github.com/ravilushqa/gpt-pullrequest-updater","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ravilushqa/gpt-pullrequest-updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravilushqa%2Fgpt-pullrequest-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravilushqa%2Fgpt-pullrequest-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravilushqa%2Fgpt-pullrequest-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravilushqa%2Fgpt-pullrequest-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravilushqa","download_url":"https://codeload.github.com/ravilushqa/gpt-pullrequest-updater/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravilushqa%2Fgpt-pullrequest-updater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273190582,"owners_count":25061099,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["actions","chatgpt","github-actions","golang","gpt","pullrequest","review-tools"],"created_at":"2025-09-01T21:19:57.661Z","updated_at":"2025-09-01T21:19:58.390Z","avatar_url":"https://github.com/ravilushqa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPT-PullRequest-Updater\n\n[![go-recipes](https://raw.githubusercontent.com/nikolaydubina/go-recipes/main/badge.svg?raw=true)](https://github.com/nikolaydubina/go-recipes)\n\nThis repository contains a tool for updating and reviewing GitHub pull requests using OpenAI's GPT language model. The project has two commands: `description` and `review`. The `description` command updates the pull request description with a high-level summary of the changes made. The `review` command creates individual comments for each file and an overall review summary comment.\n\n## Requirements\n\n- GitHub token with access to the desired repository\n- OpenAI API token\n\n## Installation\n\n```bash\ngo install github.com/ravilushqa/gpt-pullrequest-updater/cmd/description@latest\ngo install github.com/ravilushqa/gpt-pullrequest-updater/cmd/review@latest\n```\n\n## Usage\n\n### Review Command\n\nUsage:\n  ```\n  review [OPTIONS]\n  ```\n\nApplication Options:\n  ```\n      --gh-token=     GitHub token [$GITHUB_TOKEN]\n      --openai-token= OpenAI token [$OPENAI_TOKEN]\n      --owner=        GitHub owner [$OWNER]\n      --repo=         GitHub repo [$REPO]\n      --pr-number=    Pull request number [$PR_NUMBER]\n      --openai-model= OpenAI model (default: gpt-3.5-turbo) [$OPENAI_MODEL]\n      --test          Test mode [$TEST]\n  ```\n\nHelp Options:\n  ```\n  -h, --help          Show this help message\n  ```\n\nBefore running the command, make sure you have set the appropriate options or environment variables. The command line options will take precedence over the environment variables.\n\nTo run the `review` command, execute:\n\n```\n./review --gh-token=\u003cGITHUB_TOKEN\u003e --openai-token=\u003cOPENAI_TOKEN\u003e --owner=\u003cOWNER\u003e --repo=\u003cREPO\u003e --pr-number=\u003cPR_NUMBER\u003e --test\n```\n\nReplace `\u003cGITHUB_TOKEN\u003e`, `\u003cOPENAI_TOKEN\u003e`, `\u003cOWNER\u003e`, `\u003cREPO\u003e`, and `\u003cPR_NUMBER\u003e` with the appropriate values. If you want to enable test mode, add the `--test` flag.\n\n### Description Command\n\nThe usage for the `description` command is similar to the `review` command. Replace `review` with `description` in the command above and execute.\nOnly difference is that `description` command has extra option `--jira-url` which is used to generate Jira links in the description.\n\n## GitHub Action\n\nThis script can be used as a GitHub Action, allowing it to run automatically in your repository. To get started, add a new workflow file in your repository, such as: `.github/workflows/gpt_pullrequest_updater.yml`.\n\nHere's an example of what the workflow file could look like:\n\n```yaml\nname: GPT Pull Request Updater\n\non:\n   pull_request:\n      types:\n         - opened\n         - synchronize\n\njobs:\n   update_pull_request:\n      runs-on: ubuntu-latest\n\n      steps:\n         - name: Set up Go\n           uses: actions/setup-go@v2\n           with:\n              go-version: 1.19\n\n         - name: Checkout GPT-PullRequest-Updater\n           uses: actions/checkout@v2\n           with:\n              repository: ravilushqa/gpt-pullrequest-updater\n              path: gpt-pullrequest-updater\n\n         - name: Build description and review commands\n           run: |\n              cd gpt-pullrequest-updater\n              make build\n\n         - name: Update Pull Request Description\n           run: |\n              ./gpt-pullrequest-updater/bin/description\n           env:\n              GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n              OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}\n              OWNER: ${{ github.repository_owner }}\n              REPO: ${{ github.event.repository.name }}\n              PR_NUMBER: ${{ github.event.number }}\n\n         - name: Review Pull Request\n           if: github.event.action == 'opened'\n           run: |\n              ./gpt-pullrequest-updater/bin/review\n           env:\n              GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n              OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}\n              OWNER: ${{ github.repository_owner }}\n              REPO: ${{ github.event.repository.name }}\n              PR_NUMBER: ${{ github.event.number }}\n\n```\n\nMake sure to add your OpenAI API token to your repository secrets as `OPENAI_TOKEN`.\n\n### Granting Permissions for GitHub Actions\n\nIn order to use this GitHub Action, you need to grant the necessary permissions to the GitHub token. To do this, follow these steps:\n\n1. Go to the repository settings page: https://github.com/OWNER/REPO/settings\n2. Navigate to the \"Actions\" tab on the left side of the settings page.\n3. Scroll down to the \"Workflow Permissions\" section.\n\nSelect \"Read and Write\" permissions for the actions. This will provide your token with the necessary rights to modify your repository.\nBy following these steps, you'll grant the required permissions for the GPT-PullRequest-Updater GitHub Action to function properly, allowing it to update and review pull requests in your repository.\n\nLicense\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravilushqa%2Fgpt-pullrequest-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravilushqa%2Fgpt-pullrequest-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravilushqa%2Fgpt-pullrequest-updater/lists"}