https://github.com/bansikah22/pr-summarizer
Summarize PR and gives random jokes
https://github.com/bansikah22/pr-summarizer
actions rust-lang rust-library
Last synced: over 1 year ago
JSON representation
Summarize PR and gives random jokes
- Host: GitHub
- URL: https://github.com/bansikah22/pr-summarizer
- Owner: bansikah22
- License: mit
- Created: 2025-03-06T15:53:13.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-17T07:45:52.000Z (over 1 year ago)
- Last Synced: 2025-03-17T08:40:20.541Z (over 1 year ago)
- Topics: actions, rust-lang, rust-library
- Language: Rust
- Homepage:
- Size: 74.2 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PR Summarizer with Jokes




A GitHub Action that automatically summarizes pull requests and adds a random programming joke to make code reviews more enjoyable.
## Features
- ๐ **PR Change Analysis**: Detects modified, added, and deleted files
- ๐ **Summary Generation**: Converts PR changes into short, meaningful descriptions
- ๐ฌ **GitHub Commenting**: Posts the summary as a comment on the PR
- ๐ **Random Jokes**: Fetches and appends a programming joke to the comment
- ๐ **External Repository Support**: Can be used across multiple GitHub repositories
## Example Output
```
๐ PR Summary
๐ Changes Overview
โจ Implement user authentication system
โ
Added JWT token generation and validation
โ
Created user registration endpoint
๐งช Added tests for auth endpoints
๐ Updated API documentation
๐ Affected Files
๐ข [+] src/auth/jwt.rs
๐ข [+] src/auth/middleware.rs
๐ต [M] src/routes/users.rs
๐ต [M] src/models/user.rs
๐ข [+] tests/auth_tests.rs
๐ต [M] README.md
๐ Code Humor
Why do programmers prefer dark mode? Because light attracts bugs! ๐ค
This summary was automatically generated by PR Summarizer โก
```
## Usage
Add this to your repository's `.github/workflows/pr-summary.yml`:
```yaml
name: PR Summarizer
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
pull-requests: write # Required to comment on PRs
issues: write # Required for PR comments via issues API
jobs:
summarize:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensures full history for diff analysis
- name: Run PR Summarizer
uses: bansikah22/pr-summarizer@v1.0.0 # Uses the lastest actions tag
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
```
You can also visit test repositories [Test PR Summarizer](https://github.com/bansikah22/test-pr-summarizer) so see how it works on external repositories.
## How It Works
1. When a pull request is opened or updated, the action is triggered
2. It analyzes the changes made in the PR
3. It generates a concise summary of the changes
4. It fetches a programming joke from several APIs
5. It posts a comment on the PR with the summary and joke
## Development
### Prerequisites
- Rust 1.83.+
- Cargo
### Building
```bash
cargo build --release
```
## ๐ค Contributors
We appreciate the efforts of all contributors who help improve this project.
| Contributor | Role |
|-------------------|-----------------------------|
| **Noel Bansikah** | Author & Maintainer |
| **Synk** | Maintainer |
| **Christian Yamele** | Rust Developer |
Contributions are welcomed! ๐ Feel free to submit issues, feature requests, or pull requests to help enhance this project.
## ๐ License
[MIT](./LICENSE) License