Skip to content

Chore/bump dependabot 2025 12 13#40

Open
NurRobin wants to merge 16 commits into
devfrom
chore/bump-dependabot-2025-12-13
Open

Chore/bump dependabot 2025 12 13#40
NurRobin wants to merge 16 commits into
devfrom
chore/bump-dependabot-2025-12-13

Conversation

@NurRobin

Copy link
Copy Markdown
Owner

This pull request introduces several improvements to the project's build tooling and developer workflow. The most significant changes are the addition of automatic code formatting via Spotless (integrated with a new pre-commit git hook), upgrades to various Maven dependencies and plugins, and updates to GitHub Actions workflows to use the latest versions of key actions.

Developer workflow enhancements:

  • Added a pre-commit git hook (.githooks/pre-commit) that automatically runs Spotless to format code and remove unused imports before each commit, and provided a script (scripts/install-githooks.sh) to install the hooks. Documentation was updated to explain the setup process. [1] [2] [3]

Build and code quality tooling:

  • Integrated the spotless-maven-plugin into pom.xml for automated code formatting, including configuration for Java, Markdown, YAML, and .gitignore files.
  • Upgraded key dependencies and plugins in pom.xml, including sqlite-jdbc, junit-jupiter, checkstyle, spotbugs-maven-plugin, and exec-maven-plugin to their latest versions for improved security and compatibility. [1] [2] [3] [4]

CI/CD workflow updates:

  • Updated all GitHub Actions workflows to use the latest major versions of actions, including actions/setup-java@v5, actions/upload-artifact@v5, actions/github-script@v8, actions/attest-build-provenance@v3, and github/codeql-action@v4. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

These changes streamline development by enforcing consistent code formatting, keeping dependencies up to date, and ensuring CI workflows use the latest features and security updates.

Copilot AI review requested due to automatic review settings December 13, 2025 17:07
@github-actions github-actions Bot added chore dependencies Pull requests that update a dependency file docs labels Dec 13, 2025
@codecov

codecov Bot commented Dec 13, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI 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.

Pull request overview

This PR introduces developer workflow improvements through automated code formatting, dependency upgrades, and GitHub Actions workflow updates. The changes focus on establishing consistent code style via Spotless with git pre-commit hooks, while updating key build dependencies and CI/CD action versions to their latest releases.

Key Changes

  • Added Spotless Maven plugin with pre-commit git hook for automatic code formatting (Java, Markdown, YAML)
  • Upgraded Maven dependencies: sqlite-jdbc (3.46.0.1 → 3.51.1.0), junit-jupiter (5.10.2 → 6.0.1), checkstyle (10.21.4 → 12.2.0), spotbugs (4.9.3.0 → 4.9.8.2), exec-maven-plugin (3.5.1 → 3.6.2)
  • Updated all GitHub Actions workflows to use latest major versions (setup-java@v5, upload-artifact@v5, github-script@v8, codeql-action@v4, attest-build-provenance@v3)

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.githooks/pre-commit New pre-commit hook that runs Spotless formatting before commits
scripts/install-githooks.sh Installation script to enable git hooks via core.hooksPath
scripts/README.md Added documentation for git hooks setup process
pom.xml Updated 5 dependencies, added Spotless plugin configuration with ratchetFrom strategy
.github/workflows/snapshot.yml Updated to setup-java@v5 and upload-artifact@v5
.github/workflows/e2e-runtime-test.yml Updated to github-script@v8, removed trailing whitespace
.github/workflows/dependency-report.yml Updated to setup-java@v5 and upload-artifact@v5
.github/workflows/coverage.yml Updated to setup-java@v5 and upload-artifact@v5
.github/workflows/codeql.yml Updated to codeql-action@v4
.github/workflows/build.yml Updated to setup-java@v5 and upload-artifact@v5, removed trailing whitespace
.github/workflows/auto-release.yml Updated to setup-java@v5 and attest-build-provenance@v3, removed trailing whitespace

Comment thread pom.xml Outdated
Comment thread .githooks/pre-commit
Comment on lines +12 to +18
if ! git show-ref --verify --quiet refs/remotes/origin/dev; then
echo "[pre-commit] refs/remotes/origin/dev not found; skipping Spotless ratchet formatting." >&2
exit 0
fi

echo "[pre-commit] Running Spotless (format + remove unused imports)…" >&2
mvn -q -DskipTests spotless:apply

Copilot AI Dec 13, 2025

Copy link

Choose a reason for hiding this comment

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

The pre-commit hook checks for refs/remotes/origin/dev but exits silently if it doesn't exist. This could cause formatting to be skipped in repositories where the dev branch hasn't been fetched yet, leading to inconsistent formatting across developers. Consider either requiring the branch to exist or using a fallback strategy (e.g., checking if HEAD is on main/dev and skipping only in those cases).

Suggested change
if ! git show-ref --verify --quiet refs/remotes/origin/dev; then
echo "[pre-commit] refs/remotes/origin/dev not found; skipping Spotless ratchet formatting." >&2
exit 0
fi
echo "[pre-commit] Running Spotless (format + remove unused imports)…" >&2
mvn -q -DskipTests spotless:apply
# Determine ratchet base: prefer dev, then main, else none
if git show-ref --verify --quiet refs/remotes/origin/dev; then
RATCHET_BASE="origin/dev"
elif git show-ref --verify --quiet refs/remotes/origin/main; then
RATCHET_BASE="origin/main"
else
RATCHET_BASE=""
fi
if [ -n "$RATCHET_BASE" ]; then
echo "[pre-commit] Running Spotless (format + remove unused imports, ratchet: $RATCHET_BASE)…" >&2
mvn -q -Dspotless.ratchetFrom="$RATCHET_BASE" -DskipTests spotless:apply
else
echo "[pre-commit] No dev/main branch found; running Spotless on all files." >&2
mvn -q -DskipTests spotless:apply
fi

Copilot uses AI. Check for mistakes.
@github-actions

github-actions Bot commented Dec 13, 2025

Copy link
Copy Markdown

⚠️ E2E Tests: Tests did not complete

MC 1.21.10 · Plugin 0.14.0

📋 View detailed results

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore dependencies Pull requests that update a dependency file docs skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants