Skip to content

chore: add githooks to guard against unexpected commits#546

Open
zimeg wants to merge 2 commits into
mainfrom
zimeg-chore-githooks
Open

chore: add githooks to guard against unexpected commits#546
zimeg wants to merge 2 commits into
mainfrom
zimeg-chore-githooks

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented May 14, 2026

Changelog

N/A - We hope to keep main branch beautiful!

Summary

This PR guards against commits to the main branch or with incorrect formatting to unlock more agentic loops with confidence 👾 ✨

Testing

Checkout this branch and use incorrect formatting somewhere then run this command:

$ git config core.hooksPath .githooks

Open a new shell and attempt to commit!

$ git commit -m "asdf"
cmd/api/api.go:303:1: File is not properly formatted (gofmt)
        return result.APIAccessTokens.Bot, nil
^
1 issues:
* gofmt: 1

Notes

  • Unsure if make is better to call in the Git hook without having matched dependencies?

Requirements

@zimeg zimeg added this to the Next Release milestone May 14, 2026
@zimeg zimeg self-assigned this May 14, 2026
@zimeg zimeg requested a review from a team as a code owner May 14, 2026 19:12
@zimeg zimeg added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels May 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.63%. Comparing base (ebd9ae5) to head (5b2c0ca).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
- Coverage   71.64%   71.63%   -0.02%     
==========================================
  Files         225      225              
  Lines       19066    19066              
==========================================
- Hits        13660    13658       -2     
- Misses       4202     4204       +2     
  Partials     1204     1204              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Copy link
Copy Markdown
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

YESSSS

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
Copy link
Copy Markdown
Member Author

zimeg commented May 14, 2026

@WilliamBergamin I share your excitement 😸 🎉

I'm hoping this approach is alright since I understand forked branches might prefer to contribute from "main" branch, but the workarounds of "--no-verify" or using another branch do seem reasonable to me! 🤓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants