Skip to content

Add approveAll and reviewUnapproved tasks/goals to Gradle and Maven plugins#199

Merged
mkutz merged 3 commits into198-add-taskgoal-to-review-unapproved-files-across-the-projectfrom
copilot/add-review-unapproved-task
Feb 26, 2026
Merged

Add approveAll and reviewUnapproved tasks/goals to Gradle and Maven plugins#199
mkutz merged 3 commits into198-add-taskgoal-to-review-unapproved-files-across-the-projectfrom
copilot/add-review-unapproved-task

Conversation

Copy link

Copilot AI commented Feb 20, 2026

Adds two new build tool tasks/goals for dealing with unapproved files — those that have a -received.* file alongside their inventory-tracked approved file.

Core: ApprovedFileInventory

New inventory-based helpers (no filesystem walk):

  • findReceivedFiles() — for each approved path in the inventory, derives the corresponding received path and returns those that exist on disk
  • approveAll() — moves each such received file onto its approved counterpart (REPLACE_EXISTING)
  • reviewUnapproved(FileReviewer) — applies the configured reviewer to each unapproved pair; --review-unapproved CLI command uses Configuration.configuration.defaultFileReviewer()

Received path is derived from the approved path via receivedPathFor(approvedPath) — uses lastIndexOf("-approved.") to target only the last occurrence and an explicit endsWith("-approved") guard for extension-less files.

Gradle plugin

Two new JavaExec tasks in the verification group:

Task CLI arg
approvejApproveAll --approve-all
approvejReviewUnapproved --review-unapproved

Maven plugin

Two new mojos mirroring the Gradle tasks:

Goal CLI arg
approve-all --approve-all
review-unapproved --review-unapproved

The reviewer used by review-unapproved is sourced from defaultFileReviewerScript / defaultFileReviewer in approvej.properties; defaults to none if unconfigured.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add task/goal to review unapproved files across the project</issue_title>
<issue_description>Now that ApproveJ has build tool plugins, we can add new interesting tasks.

Let's add a task/goal reviewUnapproved to the two plugins to trigger a review on all the unapproved files in the project.
This should be rather easy using the existing inventory and checking if there's a corresponding received file next to it.

Also we can add an approveAll task to automatically approve all remaining unapproved files.</issue_description>

<agent_instructions>Please first provide a plan how to implement this issue.
There is some general information in the CLAUDE.md file, you might find useful.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: mkutz <3702442+mkutz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add reviewUnapproved task to project plugins Add approveAll and reviewUnapproved tasks to Gradle and Maven plugins Feb 20, 2026
Copilot AI requested a review from mkutz February 20, 2026 19:13
Co-authored-by: mkutz <3702442+mkutz@users.noreply.github.com>
Copilot AI changed the title Add approveAll and reviewUnapproved tasks to Gradle and Maven plugins Add approveAll and reviewUnapproved tasks/goals to Gradle and Maven plugins Feb 20, 2026
@mkutz mkutz marked this pull request as ready for review February 26, 2026 13:11
@mkutz mkutz merged commit 8ae8238 into 198-add-taskgoal-to-review-unapproved-files-across-the-project Feb 26, 2026
@mkutz mkutz deleted the copilot/add-review-unapproved-task branch February 26, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants