DEV Community

prem mishra
prem mishra

Posted on

From Pull Requests to PullBear: Why I Built a Developer’s Sidekick

🐼
Because developers deserve to ship clean — and sleep clean.


😫 The Problem We Keep Ignoring

Let’s face it. Code reviews have turned into crime scenes.
Vague commits. Missing tickets. .env files accidentally pushed. Late-night Slack pings asking:
"Hey, did you mean to push this?"

We’ve all tried to patch our setups with pre-commit scripts, Husky configs, and CI hacks.
But those break. Or get outdated. Or forgotten.
Because humans forget — especially at 6PM on a Friday.


🐼 Enter PullBear — The Chillest Git Sidekick

PullBear wasn’t built in a sprint planning session.
It came from real frustration.

I needed something that could:

Catch bad commit messages

Auto-add ticket IDs from branch names

Block stupid mistakes like pushing .env files

Be flexible and feel invisible in my workflow

So I built PullBear — a smart tool that lives in your Git hooks and keeps your PRs review-ready without yelling at you.


⚙️ What PullBear Does Right Now

✅ Enforces commit message rules (length, pattern, etc.)

✅ Auto-injects ticket IDs from branch names like feature/ABC-123-login

✅ Lets you choose where the ticket appears: prefix or postfix

✅ Fully customizable ticket formatting — [#ABC-123], (#123), etc.

✅ Blocks sensitive files like .env, *.pem, debug.log from being committed

✅ Supports allowlists (e.g., .env.example)

✅ Lets you write your own custom JS-based Git hooks

✅ Setup with npx pullbear init — just one command

✅ Full logging, debugging, and works cross-platform


👨‍💻 Example: The Friday Hook

With custom hooks, you can build creative checks.
For example, force every Friday commit to include a bear emoji:

// custom-hooks/fridayBear.mjs
export default function ({ commitMessage }) {
const isFriday = new Date().getDay() === 5;
if (isFriday && !commitMessage.includes("🐻")) {
throw new Error("Friday commits must include a bear. No exceptions.");
}
}

Then reference it in your config:

{
"hooks": {
"commit-msg": "custom-hooks/fridayBear.mjs"
}
}

And that’s it. Your Git flow just got culture.


🔮 What’s Coming Next

The bear’s just waking up. Here's what’s coming:

pullbear report --target origin/main: pre-PR reports that flag issues, risks, file diffs, and style mismatches

AI-powered red flag detection (anti-patterns, complexity spikes, suspicious code)

Circular dependency checks

File size and scope-limit rules

Better CI support and integrations

Prebuilt hook templates to plug into


🧠 But Isn’t This Just Husky?

Not really.

Husky is great — if you want to run scripts at Git events.
PullBear is more than that. It’s a context-aware Git reviewer.
It understands your repo setup, your tickets, your code culture — and enforces it gently.

Also, PullBear supports custom JavaScript hooks with context, not just bash commands.


⚡ Quickstart

npx pullbear init

What it does:

Installs Git hooks

Creates a sample config

You edit one file to make it yours

That’s all. You’re live.


📜 License Note

PullBear is source-available, not open-source.
You can read it. You can use it.
But commercial use, rebranding, or redistribution requires permission.

Read the LICENSE or email: [email protected]


🐾 Final Thoughts

I built PullBear because I was tired of taping tools together.
I wanted something smart that stayed out of the way.
If it saves even one weekend, I’ll call it a win.

PullBear — Your PR's new best friend.
GitHub: https://github.com/Prem-Mishra007/pullbear
npm: https://www.npmjs.com/package/pullbear


Made with ❤️ by someone who just wanted their Saturdays back.

Ship clean. Sleep clean. 🐼

Top comments (0)