mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 12:50:38 +08:00
Merge pull request #385 from Codium-ai/hl/fix_add_docs_in_scripts
Add Blacklist for Non-Editable File Extensions in Documentation
This commit is contained in:
@ -433,3 +433,6 @@ reStructuredText = [".rst", ".rest", ".rest.txt", ".rst.txt", ]
|
|||||||
wisp = [".wisp", ]
|
wisp = [".wisp", ]
|
||||||
xBase = [".prg", ".prw", ]
|
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']
|
@ -65,6 +65,11 @@ class PRAddDocs:
|
|||||||
|
|
||||||
async def _prepare_prediction(self, model: str):
|
async def _prepare_prediction(self, model: str):
|
||||||
get_logger().info('Getting PR diff...')
|
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.patches_diff = get_pr_diff(self.git_provider,
|
||||||
self.token_handler,
|
self.token_handler,
|
||||||
model,
|
model,
|
||||||
|
Reference in New Issue
Block a user