Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openjavaformat/open-java-format-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1
Choose a base ref
...
head repository: openjavaformat/open-java-format-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 15 commits
  • 7 files changed
  • 2 contributors

Commits on Sep 21, 2026

  1. Check with open-java-format 2.98.0.2, and on Windows too

    open-java-format 2.98.0.2 has a single style, so the action and the pre-commit hook stop passing --ojf, which that version only warns about, and both default to 2.98.0.2. A workflow that still pins 2.98.0.1 would now check in Google style, so this goes out as v2, and such a workflow stays on v1.
    
    2.98.0.2 also ships a native binary for Windows on x86-64. The action and the hook recognise a Windows runner or Git Bash by uname, download the binary with its .exe extension, and keep that extension on disk.
    
    The CI used to run the action on a repository without Java files, so it checked nothing. It now writes a formatted file and one that is not, and expects the action to pass the first and fail the second, on Linux and macOS on both architectures and on Windows; the hook runs through the same two cases in a scratch repository.
    abashev committed Sep 21, 2026
    Configuration menu
    Copy the full SHA
    0c83b88 View commit details
    Browse the repository at this point in the history
  2. Pin checkout and cache to full commit SHAs

    The repository requires every action to be pinned to a full-length commit SHA, so the CI refused to start: it referred to actions/checkout@v7. The composite action's own actions/cache@v6 is pinned too, to v6.1.0, because the same rule would stop it in this CI and in any repository that uses the action under such a policy.
    abashev committed Sep 21, 2026
    Configuration menu
    Copy the full SHA
    98bff05 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2026

  1. Check with open-java-format 2.98.0.3

    The action, the pre-commit hook and the CI default to 2.98.0.3, released
    on 2026-09-23. It has the same single style as 2.98.0.2, so this stays
    on v2.
    abashev committed Sep 23, 2026
    Configuration menu
    Copy the full SHA
    0baea89 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2026

  1. Check with open-java-format 2.98.0.4

    The action, the pre-commit hook and the CI default to 2.98.0.4, released
    on 2026-09-25. It keeps the single style of 2.98.0.2, so this stays on
    v2.
    abashev committed Sep 25, 2026
    Configuration menu
    Copy the full SHA
    83d0df8 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2026

  1. Check with open-java-format 2.98.0.5

    The action, the pre-commit hook and the CI default to 2.98.0.5, released
    on 2026-09-28. It keeps the single style of 2.98.0.2, so this stays on
    v2.
    
    2.98.0.5 leaves JBang directives such as //DEPS at the top of a script
    as written (openjavaformat/open-java-format#24), so the exclude example
    in the README no longer gives JBang scripts as the reason to skip files.
    It shows code copied from another project instead.
    abashev committed Sep 28, 2026
    Configuration menu
    Copy the full SHA
    80a52bb View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2026

  1. Follow open-java-format releases from CI

    Until now every open-java-format release meant editing the version by
    hand in the action, the pre-commit hook, the CI and the README, and
    pushing the result. The "Follow open-java-format releases" workflow
    now does that once an hour: .open-java-format-version holds the
    version the files are on, and when the latest GitHub release differs,
    the workflow replaces the version everywhere it is named, pushes the
    bump to main and runs Test Action on it.
    
    Test Action gains workflow_dispatch for that run, because a push made
    with the workflow's own token starts no push-triggered workflow.
    abashev committed Oct 4, 2026
    Configuration menu
    Copy the full SHA
    6e1a02b View commit details
    Browse the repository at this point in the history
  2. Test the action's default version, not a copy of it

    The Follow open-java-format releases workflow pushes with its own
    token, and GitHub refuses such a push when it changes a workflow file:
    its first run failed with "refusing to allow a GitHub App to create or
    update workflow .github/workflows/ci.yml without workflows permission".
    
    So Test Action no longer passes a version. Its steps run the action
    with the default from action.yml, which is the version that gets
    bumped, so that is what the tests should exercise anyway.
    abashev committed Oct 4, 2026
    Configuration menu
    Copy the full SHA
    e01fcae View commit details
    Browse the repository at this point in the history
  3. Check with open-java-format 2.98.0.6

    The action and the pre-commit hook default to 2.98.0.6, which
    openjavaformat/open-java-format released on 2026-10-04. Made by the
    "Follow open-java-format releases" workflow:
    https://github.com/openjavaformat/open-java-format-action/actions/runs/37218368214
    github-actions[bot] committed Oct 4, 2026
    Configuration menu
    Copy the full SHA
    b86c00b View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2026

  1. Report the version check to code scanning

    The action warns when a newer open-java-format release is out than the
    version it runs, but a log warning is easy to miss. The check is now
    also uploaded to code scanning as a SARIF file: one alert while the
    version is behind, none once it is current, which closes the alert. It
    shows under Security → Code scanning and in the "Code scanning results"
    check of a pull request, placed on the line of the workflow that names
    the version, so it points at what to change. Alerts are told apart by
    a fingerprint of that line's text, so they survive the line moving.
    
    The upload goes straight to the REST API rather than through
    github/codeql-action/upload-sarif, which fails the job when the
    security-events: write permission is missing. This way the upload is
    best-effort like the check itself: without the permission, without
    GitHub Code Security on a private repository, or with the read-only
    token of a fork's pull request, it is skipped with a line in the log
    and the log warning stays. The new code-scanning input turns it off.
    
    Test Action grants the permission to the mode=changed job, so that
    run exercises the upload, and withholds it from the platform matrix,
    whose ten runs of the action would all report the same category and
    must do without the upload anyway.
    abashev committed Oct 17, 2026
    Configuration menu
    Copy the full SHA
    00ed0e4 View commit details
    Browse the repository at this point in the history
  2. Leave the code scanning report off by default

    The report needs the security-events: write permission, which the
    default token does not have, so with it on by default every workflow
    that uses the action would have to add a permissions block, and one
    that did not would skip the upload on every run. The code-scanning
    input now defaults to false; a workflow that wants the alert sets it
    to true and grants the permission, as the README shows. The example
    workflow loses the permissions block it no longer needs.
    
    Test Action turns the report on in both jobs: with the permission in
    the mode=changed job, where the upload has to go through, and without
    it on the first run of the platform matrix, where it has to be
    skipped without failing the check.
    abashev committed Oct 17, 2026
    Configuration menu
    Copy the full SHA
    29c2b7d View commit details
    Browse the repository at this point in the history
  3. Show a recommended setup with and without code scanning

    The README had one recommended setup and, further down, a bare job
    with the permission for the code scanning report. Now the recommended
    setup comes in two complete workflows side by side: one that announces
    a newer open-java-format release in the job log alone, and one that
    also raises the code scanning alert, with the permissions that takes.
    The code scanning section points at the second instead of repeating
    it.
    abashev committed Oct 17, 2026
    Configuration menu
    Copy the full SHA
    63406a5 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2026

  1. Point the README and the example at v3

    v3 is v2 plus the optional code scanning report, so the README and
    the example workflow now use @V3, and the README says what tells the
    two apart. The v3 tag is made on this commit.
    abashev committed Oct 18, 2026
    Configuration menu
    Copy the full SHA
    25979c3 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2026

  1. Take the version from .open-java-format-version

    The action took the version as an input and the pre-commit hook pinned
    its own in FORMATTER_VERSION, so a repository had two places to keep in
    step, and either could fall behind on its own. Now both read
    .open-java-format-version from the repository root, and the version
    input is gone. Without the file, or with something in it that is not a
    version number, the action and the hook stop and say what to put there.
    
    The check for a newer release stays: the log warning and the code
    scanning alert now point at .open-java-format-version, line 1, which
    also does away with the search for the line of the workflow that named
    the version. The hook's help text says to change that one file.
    
    This repository already keeps its own version in that file for Follow
    open-java-format releases, so Test Action runs the action and the hook
    with it, and now also checks that both refuse to run without it. The
    version input is gone, so this is v4.
    abashev committed Oct 19, 2026
    Configuration menu
    Copy the full SHA
    47d9951 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2026

  1. Check with open-java-format 21.0.1

    .open-java-format-version names 21.0.1, which
    openjavaformat/open-java-format released on 2026-11-01, so the tests
    run the action and the pre-commit hook with it. Made by the
    "Follow open-java-format releases" workflow:
    https://github.com/openjavaformat/open-java-format-action/actions/runs/41343240257
    github-actions[bot] committed Nov 1, 2026
    Configuration menu
    Copy the full SHA
    e4033a1 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2026

  1. Check with open-java-format 21.0.2

    .open-java-format-version names 21.0.2, which
    openjavaformat/open-java-format released on 2026-11-08, so the tests
    run the action and the pre-commit hook with it. Made by the
    "Follow open-java-format releases" workflow:
    https://github.com/openjavaformat/open-java-format-action/actions/runs/42520644475
    github-actions[bot] committed Nov 8, 2026
    Configuration menu
    Copy the full SHA
    d26e2d7 View commit details
    Browse the repository at this point in the history
Loading