Skip to content

CI: Add GitHub Action for PR formatter#234

Merged
Ayush8923 merged 3 commits into
mainfrom
feat/github-ci-pr-formatter
Jul 1, 2026
Merged

CI: Add GitHub Action for PR formatter#234
Ayush8923 merged 3 commits into
mainfrom
feat/github-ci-pr-formatter

Conversation

@vprashrex

@vprashrex vprashrex commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Issue

Closes #235

Summary

  • Added automation to standardize pull request titles and descriptions when new PRs are opened.
  • PRs now appear in a more consistent format, with clearer summaries and preserved original context.

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran npm run dev and npm run build in the repository root and test.
  • If you've fixed a bug or added code that is tested

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A new GitHub Actions workflow (.github/workflows/pr-formatter.yml) is added. It triggers on pull_request opened events, calls the OpenAI Responses API twice—once to reformat the PR body into a structured markdown format and once to generate a semantic-release style title—then updates the PR via github.rest.pulls.update, appending the original description in a collapsible <details> block.

Changes

PR Auto-formatter Workflow

Layer / File(s) Summary
Workflow trigger and permissions
.github/workflows/pr-formatter.yml
Sets workflow name, pull_request opened trigger, and pull-requests: write permission.
Rewrite PR body via OpenAI
.github/workflows/pr-formatter.yml
POSTs original PR body to OpenAI Responses API with a structured markdown instruction, parses output_text, and fails the workflow if empty.
Generate semantic-release PR title via OpenAI
.github/workflows/pr-formatter.yml
POSTs the rewritten body to OpenAI to produce a semantic-release style title, parses output_text, fails if missing, and strips surrounding quotes.
Apply rewritten title and body to PR
.github/workflows/pr-formatter.yml
Calls github.rest.pulls.update with the new title and body; body includes a collapsible <details> block with the original PR description.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Poem

🐇 Hop, hop, a PR arrives so bare,
OpenAI fluffs the body with care,
A semantic title springs from the air,
The original tucked in a <details> snare,
No messy PR shall ever despair! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a GitHub Action for PR formatting.
Linked Issues check ✅ Passed The workflow implements an automated PR formatter that standardizes titles and bodies, matching issue #235's core goal.
Out of Scope Changes check ✅ Passed The changes stay focused on the PR formatter workflow and do not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/github-ci-pr-formatter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot changed the title CI: Add GitHub Action to format PR body and title using OpenAI chore(ci): Add GitHub Action for formatter Jun 29, 2026
@vprashrex vprashrex changed the title chore(ci): Add GitHub Action for formatter CI: Add GitHub Action for PR formatter Jun 29, 2026
@vprashrex vprashrex linked an issue Jun 29, 2026 that may be closed by this pull request
@vprashrex vprashrex requested a review from Ayush8923 June 29, 2026 09:23
@vprashrex vprashrex self-assigned this Jun 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr-formatter.yml:
- Around line 42-46: Update the default checklist text in the PR formatter
template so the fallback checklist reads naturally when the original body has no
items. In the workflow template that generates formatted PR descriptions,
replace the two default unchecked checklist entries with clearer, grammatically
correct wording, and keep the existing behavior of copying any original
checklist items exactly when they are present.
- Around line 34-35: Update the issue-linking text in the pr-formatter workflow
so it preserves the original keyword instead of always forcing “Closes”; in the
workflow/template logic around the issue placeholder, ensure the generated text
keeps values like “Related to” or “Refs” exactly as provided, and only uses
“Closes” when that was the intended original keyword.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 80ba9a72-66a1-40f0-90b9-f77265ff6a84

📥 Commits

Reviewing files that changed from the base of the PR and between 7b313f3 and d0f024a.

📒 Files selected for processing (1)
  • .github/workflows/pr-formatter.yml

Comment thread .github/workflows/pr-formatter.yml
Comment thread .github/workflows/pr-formatter.yml
Comment thread .github/workflows/pr-formatter.yml
@Ayush8923 Ayush8923 merged commit e646b0d into main Jul 1, 2026
2 checks passed
@Ayush8923 Ayush8923 deleted the feat/github-ci-pr-formatter branch July 1, 2026 10:47
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.3.0-main.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: PR formatter development

2 participants