Apply Dependency PR
Developmentapply-dependency-prApply Dependency PR is an Agent Skill for development published in the carrot2/carrot2 repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Apply and merge a Dependabot dependency-update PR in this repo — checkout the PR, regenerate versions.lock, run the full build, then commit the lock, push, and squash-merge. Use when the user wants to review/apply/merge a dependency (e.g. "dependencies" labeled) PR.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/carrot2/carrot2/blob/HEAD/.claude/skills/apply-dependency-pr/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/apply-dependency-pr, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Apply a dependency-update PR
Workflow for landing a Dependabot dependency bump in carrot2. Dependabot updates
gradle/libs.versions.toml and the Gradle wrapper but does not regenerate the
root versions.lock; because this repo uses a lockfile, the check task fails
against a stale lock. So the lock must be regenerated locally, verified, committed
back to the PR branch, and only then merged.
Steps
-
Pick the PR. If the user didn't name one, list candidates and ask which to apply:
gh pr list --label dependencies --state open --limit 20 -
Checkout the PR branch:
gh pr checkout <num> -
Regenerate the lock and run the full check (compiles against the new deps and runs the whole test suite — this is the authoritative gate). Takes a few minutes:
./gradlew writeLocks check -
Evaluate the result:
- BUILD FAILED or test regressions → stop. Report the failing task/output to the user. Do not commit or merge; investigate first.
- BUILD SUCCESSFUL, no regressions → continue.
- Watch behavioral-change risk areas: minor Lucene bumps (analysis/tokenization tests) and morfologik bumps (Polish stemming/spell tests).
-
Inspect and commit the regenerated lock.
writeLocksnormally only touchesversions.lock; confirm the diff is pure version bumps for the expected deps:git diff versions.lock git add versions.lock # plus any other files writeLocks changed git commit -m "Regenerate versions.lock for java-deps bump (#<num>)" git pushSkip this step if
writeLocksproduced no changes. -
Squash-merge and delete the branch (matches the repo's dependency-merge history):
gh pr merge <num> --squash --delete-branch -
Verify:
gh pr view <num> --json state,mergedAt # state == MERGED git log --oneline -3 # squashed commit on master
Notes
- Do not add a
Co-Authored-By/ Claude attribution trailer to the commit. - Local
checkpassing is the authoritative signal; the merge does not wait on remote CI unless the user asks otherwise. - Default merge method is squash + delete-branch. Confirm with the user if they want a merge-commit or rebase instead.