Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 8 additions & 103 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,108 +1,13 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
# Virtual environments
.venv

.env*

TODO.md
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
15 changes: 7 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ Thank you for your interest in contributing to pr-summary-github-action! This do

## Development Setup

Install Python 3.12 or higher

Install dependencies:

```bash
pip install -r requirements.txt
```
1. Install Python 3.10 or higher
2. Install [uv](https://github.com/astral-sh/uv) package manager
3. Install dependencies:
```bash
uv sync --all-extras --dev
```

## Making Changes

Expand Down Expand Up @@ -54,7 +53,7 @@ Test your changes by creating a workflow in your repository that uses your fork
Run unit tests:

```bash
python -m unittest discover -s src
uv run -m unittest discover -s src
```

## Code Style
Expand Down
22 changes: 11 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,21 @@ runs:
fi
git log origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }} --pretty=format:"%s" > commit_messages.txt

- name: 💿 Setup python
- name: 💿 Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.2"
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: 💿 Install python
uses: actions/setup-python@v5
with:
python-version: "3.12" # install the python version needed
python-version-file: ".python-version"

- name: 🦺 Install python packages
shell: bash
run: |
python -m pip install --upgrade pip
if [ -f "${{ github.action_path }}/requirements.txt" ]; then
pip install -r ${{ github.action_path }}/requirements.txt
else
echo "requirements.txt not found, installing dependencies directly"
pip install 'requests==2.32.3' 'anthropic==0.40.0' 'openai==1.55.3' 'nltk==3.9.1' 'markdown-it-py==3.0.0' 'google-genai==1.2.0'
fi
run: uv sync --all-extras --dev

- name: 🤖 Run
id: summary
Expand All @@ -115,7 +115,7 @@ runs:
if [ ! -z "${{ inputs.file }}" ] && [ -f "${{ inputs.file }}" ]; then
export DATA=$(cat "${{ inputs.file }}")
fi
python ${{ github.action_path }}/src/main.py
uv run ${{ github.action_path }}/src/main.py
shell: bash
env:
OPENAI_KEY: ${{ inputs.openAiKey }}
Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "pr-summary-github-action"
version = "0.1.0"
description = "Github action to summarize PRs"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"requests>=2.32.3",
"anthropic==0.40.0",
"openai==1.55.3",
"pytest==8.3.3",
"nltk==3.9.1",
"markdown-it-py==3.0.0",
"google-genai==1.2.0",
]
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

Loading
Loading