Skip to content

Use consistent versions for the checkout action#2319

Open
Vampire wants to merge 1 commit intomasterfrom
vampire/use-consistent-checkout-action
Open

Use consistent versions for the checkout action#2319
Vampire wants to merge 1 commit intomasterfrom
vampire/use-consistent-checkout-action

Conversation

@Vampire
Copy link
Member

@Vampire Vampire commented Mar 13, 2026

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions checkout to v6 across workflows.
    • Adjusted consistency-check configuration so workflow validation derives checkout version dynamically for more reliable CI checks.

Copy link
Member Author

Vampire commented Mar 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e30570b7-f028-4a2b-b527-02cfe0773691

📥 Commits

Reviewing files that changed from the base of the PR and between 11c3e67 and 2a10e5c.

📒 Files selected for processing (8)
  • .github/workflows/branches-and-prs.main.kts
  • .github/workflows/branches-and-prs.yaml
  • .github/workflows/codeql-analysis.main.kts
  • .github/workflows/codeql-analysis.yaml
  • .github/workflows/docs-pr.main.kts
  • .github/workflows/docs-pr.yaml
  • .github/workflows/release.main.kts
  • .github/workflows/release.yaml
✅ Files skipped from review due to trivial changes (3)
  • .github/workflows/codeql-analysis.yaml
  • .github/workflows/release.yaml
  • .github/workflows/docs-pr.yaml
🚧 Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/branches-and-prs.main.kts
  • .github/workflows/branches-and-prs.yaml
  • .github/workflows/docs-pr.main.kts
  • .github/workflows/codeql-analysis.main.kts

📝 Walkthrough

Walkthrough

Updated four YAML workflows to bump actions/checkout from v4 to v6 for the consistency-check job, and updated four Kotlin workflow DSL files to pass a consistencyCheckJobConfig that copies DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG and sets checkoutActionVersion = InferFromClasspath().

Changes

Cohort / File(s) Summary
YAML workflow files
\.github/workflows/branches-and-prs.yaml, \.github/workflows/codeql-analysis.yaml, \.github/workflows/docs-pr.yaml, \.github/workflows/release.yaml
Updated jobs.check_yaml_consistency.steps[0] checkout action reference from actions/checkout@v4actions/checkout@v6.
Kotlin workflow DSL files
\.github/workflows/branches-and-prs.main.kts, \.github/workflows/codeql-analysis.main.kts, \.github/workflows/docs-pr.main.kts, \.github/workflows/release.main.kts
Added imports for CheckoutActionVersionSource.InferFromClasspath and DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG. Passed consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(checkoutActionVersion = InferFromClasspath()) into the workflow(...) call.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through YAML, swift and spry,
Swapped checkout steps and peeked the sky,
Kotlin whispers classpath lore,
Consistency tuned, I bounce once more—
A tiny patch, a joyful cry 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: updating checkout action versions across workflow files from v4 to v6 for consistency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vampire/use-consistent-checkout-action

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link

greptile-apps bot commented Mar 13, 2026

Greptile Summary

This PR resolves a version inconsistency in the auto-generated check_yaml_consistency job across all four GitHub Actions workflows. Previously, the github-workflows-kt library was emitting a hardcoded actions/checkout@v4 reference for that job, while all user-defined jobs were already using actions/checkout@v6 (declared via @file:DependsOn("actions:checkout___major:[v6,v7-alpha)")). By adding consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(checkoutActionVersion = InferFromClasspath()) to each workflow() call, the library now resolves the checkout version from the classpath, producing v6 uniformly.

Key changes:

  • All four *.main.kts files (branches-and-prs, codeql-analysis, docs-pr, release) add consistencyCheckJobConfig with InferFromClasspath() to instruct the generator to use the classpath-declared checkout version.
  • All four corresponding *.yaml files are regenerated, updating the check_yaml_consistency job's checkout step from actions/checkout@v4 to actions/checkout@v6.
  • No logic changes are made; this is purely a tooling/version consistency fix.

Confidence Score: 5/5

  • This PR is safe to merge — it is a targeted, non-breaking consistency fix with no logic changes.
  • The change is minimal and mechanical: it adds a single configuration option to four Kotlin DSL workflow scripts and regenerates the corresponding YAML files. The InferFromClasspath() pattern correctly ties the auto-generated consistency-check job's checkout version to the same v6 already declared in @file:DependsOn. All four workflows are updated consistently, no v4 references remain in any YAML file, and common.main.kts has no checkout references. No logic, secrets handling, or runtime behavior is altered.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/branches-and-prs.main.kts Adds consistencyCheckJobConfig with InferFromClasspath() so the auto-generated consistency job uses actions/checkout@v6 (resolved from the existing @file:DependsOn declaration) rather than a library-default hardcoded version.
.github/workflows/branches-and-prs.yaml Regenerated YAML — updates check_yaml_consistency job's checkout step from actions/checkout@v4 to actions/checkout@v6, now consistent with all other jobs in this workflow.
.github/workflows/codeql-analysis.main.kts Same InferFromClasspath() addition as other .kts files; ensures the consistency check job for the CodeQL workflow resolves actions/checkout from the declared classpath dependency (v6).
.github/workflows/codeql-analysis.yaml Regenerated YAML — updates the consistency check job's checkout step from v4 to v6, no other changes.
.github/workflows/docs-pr.main.kts Same InferFromClasspath() addition applied uniformly to the docs-pr workflow.
.github/workflows/docs-pr.yaml Regenerated YAML — updates the consistency check job's checkout step from v4 to v6.
.github/workflows/release.main.kts Adds consistencyCheckJobConfig alongside the existing sourceFile = __FILE__ parameter; same InferFromClasspath() pattern applied to the release workflow.
.github/workflows/release.yaml Regenerated YAML — updates the consistency check job's checkout step from v4 to v6.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["*.main.kts script runs"] --> B["github-workflows-kt generates YAML"]
    B --> C{checkoutActionVersion source?}
    C -- "Before PR (default)" --> D["Hardcoded: actions/checkout@v4"]
    C -- "After PR (InferFromClasspath)" --> E["Resolved from @file:DependsOn\nactions:checkout___major:[v6,v7-alpha)"]
    E --> F["actions/checkout@v6"]
    D --> G["check_yaml_consistency job\nuses checkout@v4"]
    F --> H["check_yaml_consistency job\nuses checkout@v6"]
    H --> I["✅ Consistent with all other jobs\nin the workflow (also v6)"]
    G --> J["❌ Inconsistent: other jobs use v6,\nconsistency check used v4"]
Loading

Last reviewed commit: 8211655

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.16%. Comparing base (8d380cc) to head (2a10e5c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2319   +/-   ##
=========================================
  Coverage     82.16%   82.16%           
- Complexity     4822     4825    +3     
=========================================
  Files           472      472           
  Lines         15036    15036           
  Branches       1905     1905           
=========================================
+ Hits          12354    12355    +1     
  Misses         1989     1989           
+ Partials        693      692    -1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Vampire Vampire force-pushed the vampire/use-consistent-checkout-action branch from 8211655 to 11c3e67 Compare March 19, 2026 16:28
@Vampire Vampire force-pushed the vampire/use-consistent-checkout-action branch from 11c3e67 to 2a10e5c Compare March 21, 2026 21:35
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.

1 participant