GitHub Comments
How FlagShark comments on your pull requests to provide flag visibility to your team.
When FlagShark detects feature flags in a pull request, it automatically posts a comment summarizing all flags found. This gives reviewers immediate visibility into flag changes without leaving GitHub.
Comment Overview
FlagShark's PR comment includes:
- List of all flags detected in the PR
- Whether each flag is new or existing
- File locations with clickable links
- Quick actions for flag management

Comment Structure
Header
The comment header shows a summary:
๐ฆ FlagShark detected 3 feature flags in this PR
โ
2 new flags added
๐ 1 existing flag modified
Flag List
Each detected flag is listed with details:
| Flag Details | |
|---|---|
| ๐ข | enable-new-checkout (New) |
| ๐ | src/checkout/PaymentForm.tsx:42 |
| ๐ง | ldClient.variation |
| ๐ | Default: false |
File Links
Click any file path to jump directly to that line in the PR diff:
๐ [src/checkout/PaymentForm.tsx:42](link-to-diff#L42)
Flag Status Badges
New Flag (๐ข)
A flag that didn't exist in the codebase before this PR:
๐ข enable-new-checkout (New)
Modified Flag (๐ก)
A flag that exists but has changed usage:
๐ก enable-dark-mode (Modified)
Change: Added new usage in Header.tsx
Removed Flag (๐ด)
A flag being cleaned up in this PR:
๐ด enable-legacy-api (Removed)
Files cleaned: 4
Comment Actions
View in Dashboard
Click to see the flag in your FlagShark dashboard:
[View in Dashboard โ](https://app.flagshark.io/flags/enable-new-checkout)
Quick Stats
For existing flags, see quick stats:
๐ Flag Stats:
Created: 2 weeks ago
PRs affected: 5
Files using: 3
Comment Updates
Automatic Updates
When you push new commits to the PR, FlagShark:
๐ Updated (2 commits since last check)
Changes:
- Added: show-upsells (new flag)
- Removed: enable-new-checkout (no longer in diff)
Comment History
The comment shows when it was last updated:
Last updated: 5 minutes ago (commit abc1234)
Multiple Providers
If you use multiple flag providers, flags are grouped:
๐ฆ FlagShark detected 4 feature flags
LaunchDarkly (3 flags):
โโโ enable-new-checkout (New)
โโโ show-upsells (New)
โโโ enable-dark-mode (Modified)
Unleash (1 flag):
โโโ experiment-pricing (New)
Comment Settings
Customize Comment Content
Configure what appears in comments:
| Setting | Default | Description |
|---|---|---|
| Show file links | โ On | Include clickable file paths |
| Show default values | โ On | Display flag default values |
| Show flag stats | โ On | Show existing flag statistics |
| Show dashboard links | โ On | Link to FlagShark dashboard |
Disable Comments
If you prefer not to have PR comments:
Comment Permissions
FlagShark needs write access to post comments. If comments aren't appearing:
See Permissions for detailed troubleshooting.
Interacting with Comments
FlagShark Commands
You can control FlagShark using commands in PR comments. These are especially useful for automated cleanup PRs:
| Command | Description |
|---|---|
@flagshark rebase | Rebase the cleanup PR onto the latest base branch |
@flagshark update | Update the cleanup PR to reflect any new changes |
@flagshark regenerate | Regenerate the cleanup PR from scratch |
Example usage:
@flagshark rebase
FlagShark will respond with the result:
โ
Successfully rebased onto main (abc1234)
@flagshark regenerate when the cleanup PR has significant conflicts or when the flag detection logic has been updated.
Adding Context
Reply to FlagShark's comment to add context:
@flagshark-bot This flag is for the Q1 checkout experiment.
Cleanup target: March 30
FlagShark captures this context and associates it with the flag.
Requesting Re-Analysis
If you think FlagShark missed something:
@flagshark-bot Please re-analyze this PR
FlagShark will re-process the diff and update the comment.
Dismissing False Positives
If FlagShark incorrectly identified something as a flag:
@flagshark-bot Ignore "not-a-real-flag" in this PR
The flag will be marked as ignored for this PR.
Notification Integration
GitHub Notifications
When FlagShark comments, GitHub's notification system applies:
- PR author is notified
- Reviewers subscribed to the PR are notified
- Anyone @mentioned is notified
Review Requests
For critical flags, FlagShark can request review:
๐จ This PR introduces 2 kill switch flags.
Requesting review from @infrastructure-team
Configure review request rules in Settings.
CI/CD Integration
Status Checks
FlagShark can report as a status check:
โ
FlagShark: 3 flags detected (all documented)
Or warn about potential issues:
โ ๏ธ FlagShark: 2 flags detected without cleanup dates
Merge Requirements
Configure FlagShark as a required check:
Comment Examples
Typical PR Comment
## ๐ฆ FlagShark Analysis
**3 feature flags detected in this PR**
### New Flags (2)
#### `enable-new-checkout`
- ๐ [src/checkout/PaymentForm.tsx:42](link)
- ๐ง `ldClient.variation`
- ๐ Default: `false`
- [View in Dashboard โ](link)
#### `show-upsells`
- ๐ [src/checkout/Upsells.tsx:15](link)
- ๐ง `useFlags`
- ๐ Default: `false`
- [View in Dashboard โ](link)
### Modified Flags (1)
#### `enable-dark-mode`
- ๐ [src/components/Header.tsx:28](link) (new usage)
- Existing flag (created 2 weeks ago, used in 5 files)
---
*Last updated: just now โข [FlagShark Dashboard](link)*
Cleanup PR Comment
## ๐ฆ FlagShark Analysis
**2 feature flags removed in this PR** ๐งน
### Removed Flags
#### `enable-legacy-checkout`
- Files cleaned: 4
- Lines removed: 47
- Flag age: 45 days
- โ
Successfully cleaned up
#### `show-old-banner`
- Files cleaned: 2
- Lines removed: 12
- Flag age: 30 days
- โ
Successfully cleaned up
**Great job cleaning up technical debt!** ๐
---
*Last updated: just now โข [FlagShark Dashboard](link)*
Related Documentation
- Activity Feed - Track all flag activity
- Flag Detection - How detection works
- Permissions - Comment permission issues