Git Product home page Git Product logo

bitrise-step-code-review-gpt's Introduction

CodeReviewGPT

Step changelog

Let a language model give early feedback on your PRs automatically.

Description

Let a language model give early feedback on your PRs automatically.

This step uses the GitHub and OpenAI APIs to review a PR and post a comment with reminders and thought-provoking questions the PR author might have missed.

The comments are generated based on the PR title, description, and a system prompt. The step does not access code, only PR metadata (makes you write better PR descriptions ๐Ÿ˜œ).

Limitations:

  • bring your own OpenAI API key
  • GitHub only

๐Ÿงฉ Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

โš™๏ธ Configuration

Inputs
Key Description Flags Default
github_token GitHub API token with write access to the repository required, sensitive
pr_id The ID of the Pull Request to review $BITRISE_PULL_REQUEST
repo_owner The owner of the repository to review. Used for fetching PR metadata and posting the comment. $BITRISEIO_GIT_REPOSITORY_OWNER
repo_name The name of the repository to review. Used for fetching PR metadata and posting the comment. $BITRISEIO_GIT_REPOSITORY_SLUG
pr_title Title of Pull Request
pr_description Description of Pull Request
repo_description Description of the repository related to the PR. Use this field to give more context about the PR
system_prompt Initial prompt for the language model required You are an assistant helping pull request authors improve the changeset by asking questions from the author. Your questions may include potential edge-cases, side-effects to consider, or testing strategies, but you are encouraged to ask about other concerns if they are relevant to the PR. Your questions are creative and open-ended. Be polite, but use simple language and short sentences. Your response is a numbered list of comments. Limit your response to at most 5 comments. You may use Markdown formatting, but you must not include links in your output.
pr_detail_template Information about the Pull Request required About this repo: {{ .RepoDescription }} Main language of this repo: {{ .RepoMainLanguage }} PR title: {{ .PRTitle }} PR description: {{ .PRDescription }}
openai_api_key OpenAI API key to use for requests required, sensitive
openai_model OpenAI model to use required gpt-4o
verbose Enable logging additional information for troubleshooting required false
Outputs There are no outputs defined in this step

๐Ÿ™‹ Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Learn more about developing steps:

bitrise-step-code-review-gpt's People

Contributors

ofalvai avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.