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
Copy Markdown
Member

@Vampire Vampire commented Mar 13, 2026

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions checkout to v6 across workflows to use a newer action version.
    • Improved consistency-check configuration so workflow validation now determines the checkout version dynamically, making CI consistency checks more reliable and aligned with runtime configuration.

Copy link
Copy Markdown
Member Author

Vampire commented Mar 13, 2026

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 13, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d6b0bf0-6454-4992-ad05-282f17c6004f

📥 Commits

Reviewing files that changed from the base of the PR and between 2a10e5c and 6a1c373.

📒 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/release.yaml
  • .github/workflows/branches-and-prs.yaml
  • .github/workflows/branches-and-prs.main.kts
🚧 Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/codeql-analysis.yaml
  • .github/workflows/codeql-analysis.main.kts
  • .github/workflows/docs-pr.yaml
  • .github/workflows/docs-pr.main.kts

📝 Walkthrough

Walkthrough

Updated Kotlin workflow DSL files to pass a consistencyCheckJobConfig that sets checkoutActionVersion = InferFromClasspath(), and bumped actions/checkout from v4 → v6 in the check_yaml_consistency job across four YAML workflows.

Changes

Consistency-check checkout version change

Layer / File(s) Summary
Kotlin imports
\.github/workflows/branches-and-prs.main.kts, \.github/workflows/codeql-analysis.main.kts, \.github/workflows/docs-pr.main.kts, \.github/workflows/release.main.kts
Add imports for InferFromClasspath and DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.
Workflow config
\.github/workflows/branches-and-prs.main.kts, \.github/workflows/codeql-analysis.main.kts, \.github/workflows/docs-pr.main.kts, \.github/workflows/release.main.kts
Pass consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(checkoutActionVersion = InferFromClasspath()) (and sourceFile = __FILE__ where added) into workflow(...).
YAML checkout bump
\.github/workflows/branches-and-prs.yaml, \.github/workflows/codeql-analysis.yaml, \.github/workflows/docs-pr.yaml, \.github/workflows/release.yaml
Update jobs.check_yaml_consistency.steps[0] uses from actions/checkout@v4actions/checkout@v6.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I nudged the checkout, twitched my nose,
Kotlin learns from classpaths as it goes,
YAML steps now skip ahead,
v4 to v6 — a tiny tread,
Hoppity patch, the pipeline glows ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the pull request, which is to upgrade the checkout action from v4 to v6 across multiple workflow files for consistency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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
Copy Markdown

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
Copy Markdown

codecov Bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.16%. Comparing base (b822a46) to head (6a1c373).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2319   +/-   ##
=========================================
  Coverage     82.15%   82.16%           
- Complexity     4824     4825    +1     
=========================================
  Files           472      472           
  Lines         15040    15040           
  Branches       1908     1908           
=========================================
+ Hits          12356    12357    +1     
  Misses         1991     1991           
+ 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 2 times, most recently from 11c3e67 to 2a10e5c Compare March 21, 2026 21:35
@leonard84 leonard84 force-pushed the vampire/use-consistent-checkout-action branch from 2a10e5c to 6a1c373 Compare May 8, 2026 15:23
@leonard84 leonard84 enabled auto-merge (squash) May 8, 2026 15:24
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