Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pr_agent/settings/language_extensions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -433,3 +433,6 @@ reStructuredText = [".rst", ".rest", ".rest.txt", ".rst.txt", ]
wisp = [".wisp", ]
xBase = [".prg", ".prw", ]

[docs_blacklist_extensions]
# Disable docs for these extensions of text files and scripts that are not programming languages of function, classes and methods
docs_blacklist = ['sql', 'txt', 'yaml', 'json', 'xml', 'md', 'rst', 'rest', 'rest.txt', 'rst.txt', 'mdpolicy', 'mdown', 'markdown', 'mdwn', 'mkd', 'mkdn', 'mkdown', 'sh']
5 changes: 5 additions & 0 deletions pr_agent/tools/pr_add_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ async def run(self):

async def _prepare_prediction(self, model: str):
get_logger().info('Getting PR diff...')

# Disable adding docs to scripts and other non-relevant text files
from pr_agent.algo.language_handler import bad_extensions
bad_extensions += get_settings().docs_blacklist_extensions.docs_blacklist

self.patches_diff = get_pr_diff(self.git_provider,
self.token_handler,
model,
Expand Down