[PR #322] [MERGED] Add auto-fix PR workflow for linting issues #325

Closed
opened 2026-02-16 02:17:14 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-py/pull/322
Author: @adrianlyjak
Created: 2/3/2026
Status: Merged
Merged: 2/3/2026
Merged by: @adrianlyjak

Base: mainHead: claude/auto-fix-pr-action-uBfBN


📝 Commits (1)

  • fd62cc4 feat: add auto-fix PR manager action for lint failures

📊 Changes

2 files changed (+295 additions, -1 deletions)

View changed files

.github/actions/pr-fix-comment/action.yml (+279 -0)
📝 .github/workflows/lint.yml (+16 -1)

📄 Description

Summary

Implements an automated workflow to create fix PRs when linting checks fail with auto-fixable issues. This reduces friction by allowing developers to merge auto-generated fixes rather than manually running lint commands locally.

Key Changes

  • New GitHub Action (.github/actions/pr-fix-comment/action.yml):

    • Composite action that creates fix PRs and manages PR comments
    • Generates GitHub App tokens for secure authentication
    • Creates fix PRs with auto-fixed changes when issues are detected
    • Posts/updates comments to notify developers of required fixes
    • Closes fix PRs when issues are resolved in the original PR
    • Supports customizable titles, bodies, and branch names with sensible defaults
  • Updated Lint Workflow (.github/workflows/lint.yml):

    • Upgraded checkout action from v3 to v4
    • Modified pre-commit step to continue on error and capture outcome
    • Added change detection to identify auto-fixable issues
    • Integrated new auto-fix action to create fix PRs when needed
    • Fails workflow only for non-auto-fixable issues

Implementation Details

  • Uses HTML comment markers (<!-- pr-fix-comment:{check-name} -->) to reliably identify and update bot comments
  • Leverages peter-evans/create-pull-request@v6 for creating fix PRs with proper branch management
  • Supports multiple check types through configurable inputs (check-name, fix-command, etc.)
  • Auto-generates PR titles, bodies, and comments with sensible defaults
  • Gracefully handles non-PR contexts by skipping fix PR creation
  • Automatically closes fix PRs when the original PR is fixed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/workflows-py/pull/322 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 2/3/2026 **Status:** ✅ Merged **Merged:** 2/3/2026 **Merged by:** [@adrianlyjak](https://github.com/adrianlyjak) **Base:** `main` ← **Head:** `claude/auto-fix-pr-action-uBfBN` --- ### 📝 Commits (1) - [`fd62cc4`](https://github.com/run-llama/workflows-py/commit/fd62cc40d3f89bd979aaf5c8cc6ae288b731fa61) feat: add auto-fix PR manager action for lint failures ### 📊 Changes **2 files changed** (+295 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `.github/actions/pr-fix-comment/action.yml` (+279 -0) 📝 `.github/workflows/lint.yml` (+16 -1) </details> ### 📄 Description ## Summary Implements an automated workflow to create fix PRs when linting checks fail with auto-fixable issues. This reduces friction by allowing developers to merge auto-generated fixes rather than manually running lint commands locally. ## Key Changes - **New GitHub Action** (`.github/actions/pr-fix-comment/action.yml`): - Composite action that creates fix PRs and manages PR comments - Generates GitHub App tokens for secure authentication - Creates fix PRs with auto-fixed changes when issues are detected - Posts/updates comments to notify developers of required fixes - Closes fix PRs when issues are resolved in the original PR - Supports customizable titles, bodies, and branch names with sensible defaults - **Updated Lint Workflow** (`.github/workflows/lint.yml`): - Upgraded checkout action from v3 to v4 - Modified pre-commit step to continue on error and capture outcome - Added change detection to identify auto-fixable issues - Integrated new auto-fix action to create fix PRs when needed - Fails workflow only for non-auto-fixable issues ## Implementation Details - Uses HTML comment markers (`<!-- pr-fix-comment:{check-name} -->`) to reliably identify and update bot comments - Leverages `peter-evans/create-pull-request@v6` for creating fix PRs with proper branch management - Supports multiple check types through configurable inputs (check-name, fix-command, etc.) - Auto-generates PR titles, bodies, and comments with sensible defaults - Gracefully handles non-PR contexts by skipping fix PR creation - Automatically closes fix PRs when the original PR is fixed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 02:17:14 -05:00
yindo closed this issue 2026-02-16 02:17:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#325