PR Reviewer By Telnyx
Introduction
Welcome to the PR Reviewer by Telnyx GitHub Action! This guide will teach you how to set up and use the PR Reviewer By Telnyx, which leverages open-source language models running on Telnyx GPUs to automatically review your pull requests.
Prerequisites
- Sign up for a free Telnyx account if you haven't already.
Setup guide
Step 1: Obtain Your Telnyx API Key
- Log in to your Telnyx account.
- Navigate to the API Keys section in the Telnyx portal.
- Click on Create API Key.
- Copy the generated API key and store it in a secure location.
Step 2: Add Your Telnyx API Key as a Secret on GitHub
- In your GitHub repository, go to Settings > Secrets and variables > Actions.
- Click on New repository secret.
- Name the secret
TELNYX_API_KEY
. - Paste your Telnyx API key in the Value field and click Add secret.
Step 3: Create the GitHub workflow file
To integrate the Telnyx PR Reviewer into your project, follow these steps:
-
In your repository, create a new file at
.github/workflows/review_pr.yml
. -
Copy and paste the following configuration into the file:
name: PR Review
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- name: PR Review
uses: team-telnyx/reviewpr@main
with:
telnyx_api_key: ${{ secrets.TELNYX_API_KEY }}
model_name: "meta-llama/Meta-Llama-3.1-8B-Instruct" -
Commit the file to your repository.
Step 4: Optional Configuration
The model_name
parameter in the workflow file is optional. If omitted, the action will use a default language model. If you wish to specify a different model, replace 'meta-llama/Meta-Llama-3.1-8B-Instruct'
with your desired model from the Telnyx LLM Library.
Core Concepts
GitHub Actions
GitHub Actions automate workflows directly in your GitHub repository. In this case, the PR Reviewer By Telnyx is triggered by pull request events, such as when a PR is opened or updated.
Telnyx Inference API
The PR Reviewer By Telnyx uses the Telnyx Inference API to analyze and review the content of pull requests. This API allows interaction with large language models (LLMs) hosted on Telnyx infrastructure.
Model Selection
Your choice of LLM will affect the quality and behavior of the reviews. You can experiment with different models from the Telnyx LLM Library to find the best fit for your project.
Automatic PR Reviews
Once configured, the PR Reviewer By Telnyx automatically generates a review for every pull request based on the content, providing suggestions or feedback powered by the chosen language model.
Not sure how to get started?
I want to... | Relevant Tutorial |
---|---|
Learn more about GitHub Actions | GitHub Actions Documentation |
Explore more Telnyx models | Telnyx LLM Library |
Additional references
- Dive into our Telnyx Inference API documentation
- Explore our full API reference
- Review our OpenAI Compatibility Matrix
- Check out our pricing page