π₯ Holla at Your Boy
A GitHub Action that automatically creates PR comments to tag users when you leave special callouts in your code. Perfect for code reviews, getting attention on specific lines, or just letting your teammates know that you're working.
If all of this sounds confusing, check out this example right here!
- π― Customizable prefix - Use any trigger phrase you want (default:
!holla) - π Multi-language support - Works with any programming language's comment syntax
- π Smart duplicate prevention - Won't spam the same comment twice
- π₯ Multiple user mentions - Tag multiple people in one comment
- π Flexible positioning - Prefix can appear anywhere in the line
- π Debug logging - See exactly what's happening
- π§Ή Auto-clean Comments - When a conversation is resolved or when the PR is merged, the action could make a new commit erasing the line
- π€ Think of Rebranding - Perhaps a gender neutral or more formal name could be picked for this action, but nothing speaks to me like the current one
Create .github/workflows/pr-comment.yml:
name: PR Comment Scanner
on:
pull_request:
types: [opened, edited, synchronize]
jobs:
scan-comments:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Run PR Comment Scanner
uses: haxybaxy/holla-at-your-boy@v1.6
with:
comment-prefix: "!holla " # Optional: customize your triggerNote: The
permissionssection is required to allow the action to create PR comments.
// TODO: optimize this function !holla @john please review this
function slowFunction() {
// !holla @sarah @mike can you both check this logic?
return heavyComputation();
}
/*
* Complex algorithm here
* !holla everyone this needs attention
*/Create a usermap.json file in your repository root to use friendly names:
{
"users": {
"John": "john-github-username",
"Sarah": "sarah-username",
"Mike": "mike-dev"
}
}Now you can use @John, @john, or @JOHN in your comments - they'll all map to @john-github-username.
When you create or update a PR, the action will automatically:
- Scan all changed files for your prefix
- Create PR comments tagging the mentioned users
- Skip duplicate comments to avoid spam
| Input | Description | Required | Default |
|---|---|---|---|
comment-prefix |
Custom prefix to trigger comments | β | "!holla " |
Classic GitHub mentions:
jobs:
scan-comments:
permissions:
contents: read
pull-requests: write
steps:
- uses: haxybaxy/holla-at-your-boy@v1.6 # default prefix is "!holla "Custom team tag:
jobs:
scan-comments:
permissions:
contents: read
pull-requests: write
steps:
- uses: haxybaxy/holla-at-your-boy@v1.6
with:
comment-prefix: "!review "// !holla @frontend-team review this component
const MyComponent = () => {
// !holla @john optimize this loop
return data.map(item => <Item key={item.id} />);
};# !holla @data-team validate this algorithm
def calculate_metrics(data):
# !holla @alice @bob performance issue here
return expensive_calculation(data)/* !holla @design-team check these styles */
.button {
/* !holla @sarah accessibility concern */
background: #ff0000;
}-- !holla @database-team optimize this query
SELECT * FROM users
WHERE created_at > NOW() - INTERVAL 30 DAY;
-- !holla @mike index needed here?# Shell script
# !holla @devops-team security review needed
<!-- HTML -->
<!-- !holla @frontend please test in IE -->
// Go
// !holla @backend-team memory leak potential
/* C++ */
/* !holla @performance-team bottleneck identified */- Triggers: Action runs on PR open, edit, or sync
- Scanning: Only scans files changed in the PR
- Pattern Matching: Looks for your prefix anywhere in any line
- Comment Creation: Creates PR comments with the text after your prefix
- Duplicate Prevention: Tracks existing comments to avoid spam
The body of the message is always what comes after the prefix, but the prefix will still get detected if its not at the start of your message
// β
This works: !holla @john check this out
// β
Also works: TODO optimize !holla @team performance issue!holla @john check thisβ PR comment:@john check this!holla everyone reviewβ PR comment:everyone review!holla @team @lead urgentβ PR comment:@team @lead urgent
You can use aliases in comments by mentioning @Firstname. These will automatically be mapped to the correct GitHub username based on the usermap.json file. For example, @Alice becomes @alice-username.
-
Check the Action logs for debug output:
π§ Using comment prefix: "!holla " π Found 3 changed files in PR: ['src/main.js', 'README.md'] π― Found match on line 12: "// !holla @john please review" β Creating new PR comment -
Verify your prefix matches exactly (including spaces)
-
Ensure files are in the PR - only changed files are scanned
-
Check workflow permissions - make sure you've added the
permissionssection to your workflow, to avoid the 'Resource not accessible' by integration error
This error occurs when the GitHub token lacks proper permissions:
-
Add permissions to your workflow:
permissions: contents: read pull-requests: write
-
For repository owners: Go to Settings β Actions β General β "Workflow permissions" β Select "Read and write permissions"
This is a GitHub security limitation - PRs from forks have read-only access by default:
Option 1: Use pull_request_target (
on:
pull_request_target: # Instead of pull_request
types: [opened, edited, synchronize]Warning: This gives the action write access to your repo. Only use if you trust contributors.
Option 2: Manual approval workflow
- Keep
pull_requesttrigger - Comments will work for PRs from the same repository
- Fork PRs will need manual approval or different handling
- GitHub notifications depend on user settings
- Users must have access to the repository
- Check if usernames are spelled correctly
- The action tracks duplicates by file + line + content
- If content changes, it will create a new comment
- This is intentional to show updates
- Fork the repository
- Create a feature branch
- Make your changes
- Run
npm run buildto update the dist folder - Create a Pull Request
MIT License - feel free to use this in your projects!
Built with β€οΈ for better code collaboration. Originally created to make code reviews more social and fun!
According to the Urban Dictionary:
"To holla at your boy would be to exchange words or converse with said boy."
According to Mr. GPT:
The phrase "holla at your boy" is a slang expression that basically means "get in touch with me" or "let me know what's up."
"Holla" is slang for "holler," meaning to call out or communicate.
"Your boy" is a casual way for someone to refer to themselves, like saying "me" or "your friend."
So if someone says, "Holla at your boy," theyβre telling you to reach outβcould be to hang out, talk, or let them know something.