Skip to content
This repository was archived by the owner on Mar 29, 2026. It is now read-only.

🛟 Arrumador: Configure Trunk, Mise and GitHub Actions#33

Draft
lucasew wants to merge 2 commits into
masterfrom
chore/arrumador-setup-5275064478692297528
Draft

🛟 Arrumador: Configure Trunk, Mise and GitHub Actions#33
lucasew wants to merge 2 commits into
masterfrom
chore/arrumador-setup-5275064478692297528

Conversation

@lucasew

@lucasew lucasew commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

This PR configures standard tooling (mise, trunk) and establishes a robust CI/CD pipeline via GitHub Actions.

Changes:

  • Added mise.toml with go, node, trunk, usage.
  • Initialized trunk configuration.
  • Created .github/workflows/autorelease.yml following the required flow.
  • Deleted .github/workflows/update-deps.yml and old autorelease.yml.
  • Fixed lint errors and bugs in cmd/dotenv/main.go.
  • Added cmd/dotenv/main_test.go.
  • Updated Go version to 1.25.5.

PR created automatically by Jules for task 5275064478692297528 started by @lucasew

- Configure `mise` with standard tasks (lint, fmt, test, codegen, install, ci, build).
- Configure `trunk` for linting and formatting.
- Consolidate GitHub Actions into `.github/workflows/autorelease.yml`.
- Fix code issues in `cmd/dotenv/main.go` (unhandled errors, formatting).
- Add basic test `cmd/dotenv/main_test.go`.
- Update dependencies (Go 1.25.5, @trunkio/launcher 1.3.4).

Co-authored-by: lucasew <15693688+lucasew@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @lucasew, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's development infrastructure by integrating mise for streamlined toolchain management and trunk for robust code quality checks. It also modernizes the continuous integration and deployment pipeline through a new GitHub Actions autorelease workflow, ensuring more reliable and automated releases. These changes collectively aim to improve developer experience, enforce code standards, and automate release processes.

Highlights

  • Toolchain Configuration: Configured mise for consistent environment management, including Go, Node, and Trunk, and initialized trunk with a comprehensive set of linters and formatters (e.g., gofmt, golangci-lint, black, ruff, prettier, yamllint).
  • CI/CD Pipeline Enhancement: Introduced a new GitHub Actions workflow for autorelease and removed outdated CI configurations, streamlining the release process.
  • Go Version Update: Updated the Go version to 1.25.5 in go.mod and mise.toml to leverage newer language features and improvements.
  • Code Quality and Testing: Improved cmd/dotenv/main.go by fixing a potential file handle leak and added unit tests for the parseEnvTerm function to ensure correct environment variable parsing.
Changelog
  • .gitignore
    • Added mise, build/, and .trunk/out/ to ignored paths.
  • .trunk/.gitignore
    • Added ignore rules for Trunk's output, logs, and temporary files.
  • .trunk/configs/.isort.cfg
    • Configured isort to use the black profile for import sorting.
  • .trunk/configs/.markdownlint.yaml
    • Configured markdownlint to extend the prettier style, disabling formatting rules.
  • .trunk/configs/.yamllint.yaml
    • Defined yamllint rules for quoted strings, key duplicates, and octal values.
  • .trunk/configs/ruff.toml
    • Configured ruff linter to select specific checks and ignore line length violations.
  • .trunk/trunk.yaml
    • Initialized Trunk CLI with version 1.25.0.
    • Configured Trunk plugins from trunk-io/plugins.
    • Enabled runtimes for Go (1.21.0), Node (22.16.0), Python (3.10.8), and Rust (1.82.0).
    • Enabled a wide array of linters including actionlint, bandit, black, checkov, gofmt, golangci-lint2, isort, markdownlint, prettier, ruff, and yamllint.
    • Enabled trunk-upgrade-available action.
  • cmd/dotenv/main.go
    • Ensured os.File is properly closed using defer func() { _ = f.Close() }().
    • Modified parseEnvTerm("@.env") to explicitly ignore its return value.
  • cmd/dotenv/main_test.go
    • Added TestParseEnvTerm to validate environment variable parsing from --key=value arguments and error handling for invalid formats.
  • go.mod
    • Updated the required Go version from 1.15 to 1.25.5.
  • mise.toml
    • Configured mise to manage Go (1.25.5), Node (20), @trunkio/launcher (1.3.4), and usage (1.5.0).
    • Defined mise tasks for install (go mod download), codegen (go generate), build (cross-platform Go builds), test (go test), lint (trunk check), fmt (trunk fmt), and ci (depends on lint and test).
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/autorelease.yml
    • .github/workflows/update-deps.yml
Activity
  • No specific human activity (comments, reviews, progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces significant changes by configuring standard tooling (mise, trunk) and establishing a robust CI/CD pipeline via GitHub Actions. The changes include adding configuration files for mise and trunk, creating a new autorelease.yml workflow, and updating the Go version. Additionally, lint errors and bugs in cmd/dotenv/main.go have been fixed, and a new test file cmd/dotenv/main_test.go has been added. Overall, the changes aim to improve development workflow and code quality.

Comment thread cmd/dotenv/main.go
if err != nil {
return err
}
defer func() { _ = f.Close() }()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The defer f.Close() statement should be placed immediately after os.Open(filename) to ensure the file is closed even if an error occurs during the subsequent operations. While the current placement works, it's a good practice to defer resource cleanup as soon as the resource is acquired.

Suggested change
defer func() { _ = f.Close() }()
defer func() { _ = f.Close() }()

Comment thread cmd/dotenv/main.go
if !foundDivider {
handleError(fmt.Errorf("missing divider (--)"))
}
_ = parseEnvTerm("@.env")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The return value of parseEnvTerm("@.env") is an error that is currently ignored. While it might be intentional to ignore errors for the default .env file, it's better to explicitly handle it or at least acknowledge it with a comment if it's truly meant to be ignored. Ignoring errors silently can hide potential issues.

Suggested change
_ = parseEnvTerm("@.env")
_ = parseEnvTerm("@.env")

Comment thread cmd/dotenv/main_test.go
func TestParseEnvTerm(t *testing.T) {
// Reset env
env = make(map[string]string)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

It's good practice to reset the env map before each test case to ensure test isolation and prevent side effects from previous tests. This ensures that each test runs in a clean state.

Suggested change
env = make(map[string]string)

- Configure `mise` with standard tasks (lint, fmt, test, codegen, install, ci, build).
- Configure `trunk` for linting and formatting.
- Consolidate GitHub Actions into `.github/workflows/autorelease.yml`.
- Fix code issues in `cmd/dotenv/main.go` (unhandled errors, formatting).
- Add basic test `cmd/dotenv/main_test.go`.
- Update dependencies (Go 1.26.0, @trunkio/launcher 1.3.4).
- Use latest dependencies for GitHub Actions (checkout@v6, create-pull-request@v8).
- Disable incompatible linters (golangci-lint2, nixpkgs-fmt).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant