Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /rileyseaburg_codetether /a2a_server /github_app /mention.py
| """Mention detection for GitHub App webhook comments.""" | |
| from .settings import APP_SLUG | |
| _FIX_TERMS = ( | |
| 'fix', 'apply', 'address', 'implement', 'patch', 'rename', 'modify', | |
| 'edit', 'refactor', 'resolve', 'cleanup', 'clean up', 'please fix', | |
| 'retry', 'continue', 'finish', 'enhance', 'improve', 'handle', | |
| 'change', 'changes', 'update', 'follow up', 'follow-up', | |
| 'make changes', 'make the changes', 'make follow up changes', | |
| 'address feedback', 'address review', 'address comments', | |
| 'requested changes', 'review changes', 'finish the feature', | |
| 'continue the fix', 'retry this', 'make tests pass', 'make test pass', | |
| 'make build pass', 'make ci pass', 'make lint pass', 'make this work', | |
| 'make it work', 'make that work', 'handle this bug', 'handle this issue', | |
| 'build failed', 'build failure', 'failing build', 'failed build', | |
| 'check failed', 'checks failed', 'failing check', 'failing checks', | |
| 'ci failed', 'ci failure', 'failing ci', 'tests failed', 'test failed', | |
| 'lint failed', 'typecheck failed', 'workflow failed', 'action failed', | |
| ) | |
| def mentions_bot(body: str) -> bool: | |
| """Return true when a comment explicitly mentions the app slug.""" | |
| return f'@{APP_SLUG.lower()}' in (body or '').lower() | |
| def is_fix_request(body: str) -> bool: | |
| """Return true when the mention clearly asks for branch changes.""" | |
| normalized = ' '.join((body or '').lower().split()) | |
| return mentions_bot(normalized) and any(term in normalized for term in _FIX_TERMS) | |
Xet Storage Details
- Size:
- 1.52 kB
- Xet hash:
- dd84ef9d64d44e3d2d4d3bd037e348fa3e690f24cb662518a8782ed5f9c2893d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.