Skip to content

update AddDBotScoreToContext script #40864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

update AddDBotScoreToContext script #40864

wants to merge 7 commits into from

Conversation

tcarmeli1
Copy link
Contributor

@tcarmeli1 tcarmeli1 commented Aug 7, 2025

removed indicator argument in AddDBotScoreToContext script.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Copy link

github-actions bot commented Aug 7, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/Redmine/Integrations/Redmine
   Redmine.py3587479%52–54, 87, 181, 211–216, 247, 254–261, 263–264, 270, 280–283, 285, 342–345, 359, 387, 456–460, 464, 524, 532–535, 547, 549, 567, 569, 733–739, 741–742, 744–745, 758, 760–769, 771, 773–774
TOTAL3587479% 

Tests Skipped Failures Errors Time
57 0 💤 0 ❌ 0 🔥 3.320s ⏱️

@tcarmeli1 tcarmeli1 changed the title fix update AddDBotScoreToContext script Aug 7, 2025
@content-bot
Copy link
Collaborator

⚠️ The PR is missing the ready-for-pipeline-running label. Please add the label when the PR is ready in order to proceed.

@content-bot
Copy link
Collaborator

Validate summary
The following errors were thrown as a part of this pr: .
If the AG100 validation in the pre-commit GitHub Action fails, the pull request cannot be force-merged.

Verdict: PR can be force merged from validate perspective? ✅

@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 19, 2025
@demisto demisto deleted a comment from content-bot Aug 20, 2025

command_results=CommandResults(outputs_prefix = "DBotScore" , outputs = dbotscore)
sleep(10000000)
return_results( command_results )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of sleep is not permitted in XSOAR scripts. Please remove the sleep(10000000) call on this line and the corresponding import from time import sleep on line 1.

SCORE = int( demisto.args().get("score") )
vendor=demisto.args().get( "vendor")
Reliability=demisto.args().get("reliability",None)
LOG( "Got all arguments" )

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LOG() function is deprecated and should not be used. Please replace it with a standard logging function like demisto.debug().

indicator=demisto.args().get("indicator")
indicatorType=demisto.args().get("indicatorType")
SCORE = int( demisto.args().get("score") )
vendor=demisto.args().get( "vendor")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable names should follow PEP 8 conventions (snake_case). Please rename SCORE to score and Reliability (on line 12) to reliability for consistency.

vendor = demisto.args().get("vendor")
reliability = demisto.args().get("reliability", None)
indicator=demisto.args().get("indicator")
indicatorType=demisto.args().get("indicatorType")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code exhibits inconsistent spacing around operators and in function calls, which harms readability. Please apply consistent formatting (e.g., indicator = demisto.args().get('indicator')).

vendor = demisto.args().get("vendor")
reliability = demisto.args().get("reliability", None)
indicator=demisto.args().get("indicator")
indicatorType=demisto.args().get("indicatorType")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block of code has multiple PEP 8 spacing violations. Please run a linter or auto-formatter to correct them.

indicator=demisto.args().get("indicator")
indicatorType=demisto.args().get("indicatorType")
SCORE = int( demisto.args().get("score") )
vendor=demisto.args().get( "vendor")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adhere to PEP 8 naming conventions by using snake_case for variables.

SCORE = int( demisto.args().get("score") )
vendor=demisto.args().get( "vendor")
Reliability=demisto.args().get("reliability",None)
LOG( "Got all arguments" )

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the extra spacing inside the function call. Also, consider if this generic log message is necessary for the final script.


command_results=CommandResults(outputs_prefix = "DBotScore" , outputs = dbotscore)
sleep(10000000)
return_results( command_results )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sleep call will cause the script to hang for over 100 days and must be removed.

@@ -11,6 +8,9 @@ args:
- description: The vendor to assign to this DBotScoreEntry
name: vendor
required: true
- description: The vendor nick name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new argument has a structural issue and does not follow naming conventions. Please correct the indentation and rename the argument to use snake_case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants