|
| 1 | +# 🔧 PR Fix |
| 2 | + |
| 3 | +> For an overview of all available workflows, see the [main README](../README.md). |
| 4 | +
|
| 5 | +The ["@pr-fix" workflow](../workflows/pr-fix.md?plain=1) is an alias workflow "@pr-fix" that will help you fix and complete pull requests. By default it will analyze failing CI checks in pull requests, identify root causes, and implement fixes to resolve issues and get PRs back to a passing state. |
| 6 | + |
| 7 | +You can trigger the workflow in default mode by adding a comment to a pull request with the alias: |
| 8 | + |
| 9 | +``` |
| 10 | +@pr-fix |
| 11 | +``` |
| 12 | + |
| 13 | +or by writing a comment: |
| 14 | + |
| 15 | +``` |
| 16 | +@pr-fix Please add more tests. |
| 17 | +``` |
| 18 | + |
| 19 | +## Installation |
| 20 | + |
| 21 | +```bash |
| 22 | +gh aw add pr-fix -r githubnext/agentics --pr |
| 23 | +``` |
| 24 | + |
| 25 | +This creates a pull request to add the workflow to your repository. You can't start a run of this workflow directly as it is triggered in the context of a pull request with failing checks. |
| 26 | + |
| 27 | +To trigger the workflow on a specific pull request, add a comment with the alias: |
| 28 | + |
| 29 | +``` |
| 30 | +@pr-fix |
| 31 | +``` |
| 32 | + |
| 33 | +IMPORTANT: GitHub Actions runs will **not** trigger on commits pushed by this workflow and will **not** tell you that CI has not been run unless you have enabled a specific custom check for this condition. **You must open/close the PR or hit "Update branch" if offered to trigger CI.Yes it's painful and yes it's just something you need to be aware of. |
| 34 | + |
| 35 | +**Checklist** |
| 36 | + |
| 37 | +* [ ] I have read the notes on coding tasks in the [main README](../README.md) and understand the implications. |
| 38 | + |
| 39 | +* [ ] I am a repository admin or have sufficient permissions, and am happy for this workflow to push new branches to the repository. |
| 40 | + |
| 41 | +* [ ] I have enabled "Allow GitHub Actions to create and approve pull requests" in the repository settings under "Actions > General" |
| 42 | + |
| 43 | +* [ ] I have considered enabling "Always suggest updating pull request branches" in the repository settings |
| 44 | + |
| 45 | +* [ ] If in a fork, I have enabled "GitHub Actions" and "GitHub Issues" in the fork repository settings |
| 46 | + |
| 47 | +* [ ] I will review all pull requests very carefully, and carefully monitor the repository. |
| 48 | + |
| 49 | +* [ ] I will operate this demonstrator for a time-limited period only (the default is 48h). |
| 50 | + |
| 51 | +* [ ] I understand that GitHub Actions runs will **not** trigger on pull requests created by this workflow, see above. |
| 52 | + |
| 53 | +## Configuration |
| 54 | + |
| 55 | +This workflow requires no configuration and works out of the box. However, you can customize it as follows: |
| 56 | + |
| 57 | +1. Use local configuration to specify custom build commands, testing procedures, linting rules, and code formatting standards. Local configuration can be done in `.github/workflows/agentics/pr-fix.config.md`. |
| 58 | + |
| 59 | +2. Build tool configuration for build tools shared across all workflows installed from this pack can be done in `.github/workflows/agentics/build-tools.md`. |
| 60 | + |
| 61 | +After editing run `gh aw compile` to update the workflow and commit all changes to the default branch. |
| 62 | + |
| 63 | +## What it reads from GitHub |
| 64 | + |
| 65 | +- Pull request details, files, and metadata |
| 66 | +- Workflow run logs and job outputs |
| 67 | +- Check run results and status information |
| 68 | +- Commit information and diff context |
| 69 | +- Repository contents and file structure |
| 70 | +- Existing issues related to CI failures |
| 71 | + |
| 72 | +## What it creates |
| 73 | + |
| 74 | +- Pushes fixes directly to the pull request branch |
| 75 | +- Adds comments to pull requests explaining the changes made |
| 76 | +- May create issues for complex problems requiring human intervention |
| 77 | +- Requires `contents: write` and `pull-requests: write` permissions |
| 78 | + |
| 79 | +## What web searches it performs |
| 80 | + |
| 81 | +- Searches for error message documentation and solutions |
| 82 | +- Looks up best practices for specific technologies and frameworks |
| 83 | +- Researches common fixes for build and test failures |
| 84 | + |
| 85 | +## Human in the loop |
| 86 | + |
| 87 | +- Review all changes pushed by the workflow before merging the PR |
| 88 | +- Validate that fixes actually resolve the intended issues |
| 89 | +- Monitor for any unintended side effects or regressions |
| 90 | +- Provide additional context or instructions via PR comments when needed |
| 91 | +- Override or revert changes if the automated fix is incorrect |
| 92 | + |
| 93 | +## Activity duration |
| 94 | + |
| 95 | +- By default this workflow will run for up to 48 hours after being triggered |
| 96 | +- The workflow stops automatically after this period to prevent indefinite runs |
| 97 | +- You can re-trigger the workflow by commenting with the alias again if needed |
0 commit comments