Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

keywords.py 712 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  1. from typing import Optional
  2. from bohrapi.artifacts import Commit
  3. from bohrapi.heuristictypes import KeywordHeuristics
  4. from bohrapi.util.misc import NgramSet
  5. from bohrlabels.core import OneOrManyLabels
  6. from bohrlabels.labels import CommitLabel
  7. @KeywordHeuristics(
  8. Commit,
  9. keywords=[
  10. "move",
  11. "refactor",
  12. "renam",
  13. "reorgan",
  14. "restructur",
  15. "rewrit",
  16. "simplif",
  17. "simplifi",
  18. ],
  19. name_pattern="bugless_message_keyword_%1",
  20. )
  21. def bugless_keywords_lookup_in_message(
  22. commit: Commit, keywords: NgramSet
  23. ) -> Optional[OneOrManyLabels]:
  24. if commit.message.match_ngrams(keywords):
  25. return CommitLabel.Refactoring
  26. return None
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...