Skip to content
/ utils Public

Set up the latest Go for pre-commit#830

Merged
5ouma merged 1 commit intomainfrom
fix-pre-commit-setup-go
Mar 25, 2026
Merged

Set up the latest Go for pre-commit#830
5ouma merged 1 commit intomainfrom
fix-pre-commit-setup-go

Conversation

@5ouma
Copy link
Owner

@5ouma 5ouma commented Mar 25, 2026

It's been used in some hooks.

Copilot AI review requested due to automatic review settings March 25, 2026 13:05
@github-actions github-actions bot added the 🚸 pre-commit Check the code with pre-commit hooks label Mar 25, 2026
@5ouma 5ouma force-pushed the fix-pre-commit-setup-go branch from b7db910 to 6f5ee52 Compare March 25, 2026 13:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Go toolchain setup to the pre-commit composite action so Go-based pre-commit hooks can run in CI environments where Go isn’t already available.

Changes:

  • Add an actions/setup-go step to the pre-commit composite action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@5ouma 5ouma force-pushed the fix-pre-commit-setup-go branch from 6f5ee52 to 7a2b859 Compare March 25, 2026 13:09
It's been used in some hooks.
@5ouma 5ouma force-pushed the fix-pre-commit-setup-go branch from 7a2b859 to 8e1d4f0 Compare March 25, 2026 13:13
@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

A new composite step was added to pre-commit/action.yml that installs Go via actions/setup-go@v6.3.0 with go-version: stable, inserted immediately before the prek run -ac="$PREK_CONFIG" step. No other steps or environment/configuration were changed.

Changes

Cohort / File(s) Summary
GitHub Actions Configuration
pre-commit/action.yml
Inserted a Set up Go step using actions/setup-go@v6.3.0 with go-version: stable immediately before the existing Run prek step; no other step logic or envs were altered.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description 'It's been used in some hooks.' is vague and does not clearly convey meaningful information about what the changeset accomplishes or why. Expand the description to explain why Go setup is needed, which hooks use it, and what benefit this change provides.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Set up the latest Go' clearly and specifically describes the main change: adding Go setup to the workflow.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-pre-commit-setup-go

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pre-commit/action.yml (1)

49-49: Pin Go version to a specific release for reproducible CI.

Using go-version: stable resolves to the latest stable Go version, which changes as new releases occur. For deterministic workflows, pin to an exact version (for example 1.26.1) instead of a version alias, then update intentionally when upgrading Go.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pre-commit/action.yml` at line 49, The workflow uses go-version: stable which
is non-deterministic; update the action configuration to pin the Go toolchain to
a specific release (e.g. replace the go-version value "stable" with an explicit
version string like "1.26.1") so builds are reproducible and only change when
you intentionally bump the Go version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@pre-commit/action.yml`:
- Line 49: The workflow uses go-version: stable which is non-deterministic;
update the action configuration to pin the Go toolchain to a specific release
(e.g. replace the go-version value "stable" with an explicit version string like
"1.26.1") so builds are reproducible and only change when you intentionally bump
the Go version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 510e1b1b-d1f2-4f4f-975b-0cd49d874b8e

📥 Commits

Reviewing files that changed from the base of the PR and between 610531f and 7a2b859.

📒 Files selected for processing (1)
  • pre-commit/action.yml

@5ouma 5ouma merged commit 7689804 into main Mar 25, 2026
4 of 5 checks passed
@5ouma 5ouma deleted the fix-pre-commit-setup-go branch March 25, 2026 13:17
@5ouma 5ouma bot mentioned this pull request Mar 25, 2026
@5ouma 5ouma changed the title Set up the latest Go Set up the latest Go for pre-commit Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚸 pre-commit Check the code with pre-commit hooks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants